[Proj] Geo Transfoms and calculations
OvV_HN
ovv at hetnet.nl
Tue Dec 30 13:39:34 EST 2008
Is GSL that accurate?
It could be that I'm missing something, but GNU GSL does the asinh, acosh
and atanh functions with the aid of a log1p function which is not
significantly accurate for small x, although the comments say "cancels
errors with IEEE arithmetic". Just compare this with the Cephes log1p
function, published by Steve Moshier; see the file cmath:unity.c. The Cephes
log1p has a "Theoretical peak relative error = 2.32e-20". Could be sometimes
worse than a complete error cancellation, but does the error always cancel?
What I´m trying to say is: don't bet all your horses blindly on GNU GSL.
Oscar van Vlijmen
----- Original Message -----
From: "Eric Miller" <EMiller at dfg.ca.gov>
To: <proj at lists.maptools.org>
Sent: Tuesday, December 30, 2008 6:39 PM
Subject: Re: [Proj] Geo Transfoms and calculations
You need only a minor modification to Gerald's libproj4 to compile on
windows. Because Microsoft is lame, their math library does not include
atanh (or asinh or acosh).
Previously, I overcame this by building in a naive implementation of
atanh as:
double atanh( double x )
{
return log((1 + x)/(1 - x))/2;
}
Since Gerald has since embraced the GSL, maybe we can get him to use
the GSL versions of those functions and let the GNU folks handle
platform compatibility.
More information about the Proj
mailing list