View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Wed Nov 21, 2018 10:22 am Post subject: |
|
|
Paul, I really meant:
REAL*4 1.0E0
REAL*8 1.0D0
REAL*10 1.0?0
Where ? is the mystical precision-defining letter. I wondered what it might be - that is, if it exists.
Eddie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Wed Nov 21, 2018 11:34 am Post subject: |
|
|
Eddie
I have had a look and I can only see E and D when parsing a number. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Wed Nov 21, 2018 12:48 pm Post subject: |
|
|
Paul,
I suspected it was so. Presumably, the functions that are intrinsic to the x87 are calculated to 10-byte precision anyway. Thus, one might get a different answer with (say)
Code: | REAL T, A, B
T = TAN(A)
B = T*T |
than with
Code: | REAL T, A, B
B = TAN(A)*TAN(A) |
because T would be truncated down to REAL*4, whereas the result for TAN(A) might just be held in an x87 register. They would both definitely give the same answer with XREAL, and probably one would need to look at the last few significant digits with DREAL.
It;s a pity about there not being a REAL*10 constant (may I suggest 'X' ?), but then many constants are the real equivalent of integers, and the extension even from REAL*4 is a matter of simply adding zeroes.
Thanks for looking.
Eddie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Wed Nov 21, 2018 1:52 pm Post subject: |
|
|
Eddie
REAL*10 constant are currently available in the form that I described above. Here is a sample...
Code: | integer,parameter::k = SELECTED_REAL_KIND(18,4931)
real(k),parameter::c = 1.23456789012345678_k
print*,c
end |
If you use /XREAL then you don't need the trailing '_k'. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Wed Nov 21, 2018 2:52 pm Post subject: |
|
|
OK Paul,
It hadn't really penetrated my skull, not using KINDs as I'm stuck in the past - The past s a foreign country, they do things differently there. (Usually better, in my view).
Eddie |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Wed Nov 21, 2018 10:36 pm Post subject: |
|
|
Was precision larger than real*8 implemented in /64 ? The real*10 was missing
Last edited by DanRRight on Thu Nov 22, 2018 7:52 pm; edited 1 time in total |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Thu Nov 22, 2018 8:30 am Post subject: |
|
|
REAL*10 is not available for 64 bits. As I understand it, this is a limitation of the hardware (the processor) not FTN95. |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Thu Nov 22, 2018 8:27 pm Post subject: |
|
|
But how the code mentioned above claimed to work as real*10 which uses
integer,parameter::k = SELECTED_REAL_KIND(18,4931) ? |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
Posted: Thu Nov 22, 2018 8:42 pm Post subject: |
|
|
That code works only in 32-bits. If you specify /64 when compiling, you will see
Quote: | *** /DEFREAL_KIND 3 is not available in FTN95/64 |
|
|
Back to top |
|
 |
FK_GER
Joined: 26 Oct 2017 Posts: 35 Location: University of Kassel,Germany
|
Posted: Sat Dec 15, 2018 2:50 pm Post subject: |
|
|
Hello everyone,
only yesterday I've some time to study my described problem. And sorry, but I don't have tracked the course of the discussion since Nov-15, my last input.
My declaration: The real cause of the differences is the determination of the k-values, especially k3 (look at my previous posted picture). These k-values are buildt with a lot of pre-terms, which for their part are the results of extensive iteration processes. The k3-value depends on more than 12 of these iterated pre-terms for example, at which two of these pre-terms are multiplied with each other at first and added subsequently. At such a process with single precision values rounding inaccuracies appear and have an explicit effect on the following calculated terms.
My solution: All significant terms, which are used for the determination of the k-values, are defined as REAL*8.
Result: The computation of checkmate-version and of the release-version is identically! - Problem solved! |
|
Back to top |
|
 |
|