FORTRAN floating point accuracy problems
|
03-27-2016, 10:47 PM
Post: #3
|
|||
|
|||
RE: FORTRAN floating point accuracy problems
For this kind of problem, I find first dealing with the sign and then getting into an integer domain as fast as possible and then applying corrections there is usually the best approach.
You've got integer degrees already, multiply by 60 and get integer minutes, then again by sixty to get seconds (which will have to stay real). Then sanity check everything to deal with the corner cases. You'll end up with a pile of code along the lines of: Code: if seconds .ge. 60 then - Pauli |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 7 Guest(s)