[Proj] A tangential aside

Gerald I. Evenden geraldi.evenden at gmail.com
Fri Aug 29 14:34:39 EDT 2008


I knew that using tan(x) as a function example would likely agitate the ivory 
tower math types but I suspect most of us down and dirty applied programmers 
treat it as a simple function and avoid tan's nasty behavior near |pi/2| by 
having tolerance tests of the argument and thus seek an alternate program 
route if there is going to be a problem.  You will find many of these tests 
within the libproj4 library code and a whole section of added functions that 
provide argument range testing before calling transcendental functions 
entries with the sole purpose of providing a known course of action before a 
funky operation occurs.

Some of these test date back to the GCTP days in the '60s.

As pointed out, some cpu's provide enhanced status indicators as to what 
happened during a function evaluation; but relying upon this feature 
compromises machine independent code.

-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist


More information about the Proj mailing list