Post Reply 
rskey's Calculator forensics in Fortran
03-13-2016, 04:51 PM
Post: #12
RE: rskey's Calculator forensics in Fortran
(03-13-2016 02:15 PM)HP67 Wrote:  
(03-08-2016 05:31 PM)Paul Berger (Canada) Wrote:  

Hi Paul,

thanks I have updated the first post with your results. Do you see any difference if you specify double precision constants? The way the code is written it would normally cause standard reals to have to be promoted to REAL*8. For instance 180.0 in double precision in FORTRAN IV thru F90 would probably have to be specified as 180.0D0. I can't remember when KIND came into vogue but I think from F95 something like 180.0_8 would be the way to code it. I have seen accuracy fall off when constants are not declared with the correct precision but your result seems to contradict that. I wonder if there is some default in the compiler you're using that handles that automagically.

The format for double precision constants in the compiler is 180.0D0, and it makes no difference. One thing that is unexpected the compiler has 3 math libraries 8087 hardware, 8087 emulation, and "REGMATH.LIB". The REGMATH library is supposed to be a faster library, with reduced precision but it still gives the same result.

Paul.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: rskey's Calculator forensics in Fortran - Paul Berger (Canada) - 03-13-2016 04:51 PM



User(s) browsing this thread: 1 Guest(s)