FORTRAN floating point accuracy problems
|
05-04-2016, 02:50 PM
(This post was last modified: 05-04-2016 02:52 PM by HP67.)
Post: #52
|
|||
|
|||
RE: FORTRAN floating point accuracy problems
(05-04-2016 01:34 PM)Dieter Wrote: Fine. There is just one issue: if the input is very small, i.e. dms is a fraction of a second, or maybe even something below 1E–16, the input may be rounded down to zero. This can be avoided by replacing the respective lines by this: Actually I had a FLOOR function in FORTRAN that was based on the less than optimal IDINT function that I replaced with my handy-dandy assembler DINT. So this is available now. This is what I have been using, does it look ok or can it be improved: Code:
(05-04-2016 01:34 PM)Dieter Wrote: Now add a few lines that handle dms<0 (there is a DSIGN function in Fortran IV) or dms=0 (simply return zero), and you're done. Given our beautiful results above is this necessary? If you think it's a good idea I'll look into that later since I have shut the machine off already. Thanks again. It ain't OVER 'till it's 2 PICK |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)