- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
COMPLEX*16 ZZ = (-0.681266158659309,0.000000000000000E+000)
N2 = 1
S = 1.0
THRESH2 = 11.5129251480103
SIGMA = 2.99365733225037
XNU = 0.0
FVAL=-DREAL(CDEXP(-CDLOG(Z)
* -N2*CDLOG(1.0+Z)-S*Z/(1.0+Z)
* +THRESH2*Z)*DCMPLX(1.0D0,SIGMA*XNU))/3.1415926536D0
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you'd like us to do something with this, please submit a test case to Intel Premier Support, and we'll be glad to investigate further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Message Edited by anthonyrichards on 07-20-2005 06:36 AM
Message Edited by anthonyrichards on 07-20-2005 07:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry about not previewing the message before posting it. I forgot the blanks would get removed if it wasn't set as SRC
The last 2 lines were continuation lines with an * in column 6
IMPLICIT DOUBLE PRECISION (A-H,O-Z) COMPLEX*16 Z Z = (-0.681266158659309,0.000000000000000E+000) N2 = 1 S = 1.0 THRESH2 = 11.5129251480103 SIGMA = 2.99365733225037 XNU = 0.0 FVAL=-DREAL(CDEXP(-CDLOG(Z) * -N2*CDLOG(1.0+Z)-S*Z/(1.0+Z) * +THRESH2*Z)*DCMPLX(1.0D0,SIGMA*XNU))/3.1415926536D0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That last message of mine had a question sort of hidden at the end of it.
Icompleted anextensive debugging session where I ran 2 debuggers in parallel and compared them. Since this problem did not happen after the first time the FVAL= assignment statement was executed I tried comparing the first execution of the statement with a 2nd execution of the statement.
I was primarially looking at the registers and stepping thru the machine code disassembly
I found that the main difference at the beginning of the statement in question wasthat the value of the TAGS register was different.
I decided to try and change the value of register TAGS from 0FFF to FFFF prior to the first execution of the statement since the TAGS register had the value of FFFF on the subsequent executions of that statement which worked. I found that by changing TAGS to FFFF that the problem goes away and the first execution of the statement also yeildsa result instead of a NaN.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Z = (-0.681266158659309D0,0.000000000000000D0)
The same for the others. There may be a problem an assumption of the state of the FPU when a variable is initialized with a value that is not in the precision of the variable. It is a simple enough test.
Likewise use double literals on expressions. Also consider using a DOUBLE for N2 (or eliminate it due to it being 1)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
COMPLEX*16 Z
Z = (-0.681266158659309D0,0.000000000000000D0)
wasN2 = 1.0D0
S = 1.0D0
THRESH2 = 11.5129251480103D0
SIGMA = 2.99365733225037D0
XNU = 0.0D0
FVAL=-DREAL(CDEXP(-CDLOG(Z)
* -wasN2*CDLOG(1.0D0+Z)-S*Z/(1.0D0+Z)
* +THRESH2*Z)*DCMPLX(1.0D0,SIGMA*XNU))/3.1415926536D0
If you need further assistance let me know.
Note, I had similar problems in conversion of an F77 project (715 files/6MB code). Drove me nuts for a while. Things worked in Debug configuration and broke in Release configuration.
I did not figure out the real cause. My guess though is that a REAL*4 got pushed on the stack and was later assumed to be the alternate higher precision.
Much of the problems (but not all) were corrected by specifying the default real precison to that desired, in my case this was REAL*8.
In your case you may have to explicitly specify precisions.
Good luck with your conversion project.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page