Hi all,
I'm working to increase accuracy of ScArcCosHyp(). The function acosh is
part of C99 but not provided by MSVC. Therefore I have written the
ersatz in sal\rtl\source\math.cxx
double SAL_CALL rtl_math_acosh( double fX ) SAL_THROW_EXTERN_C()
{
double fZ = fX - 1.0;
if ( fX == 1.0)
return 0.0;
else if (fX < 1.1)
return rtl_math_log1p(fZ+sqrt(fZ*fZ+2.0*fZ));
else if ( fX < 1.25e7)
return log(fX+sqrt(fX*fX-1.0));
else
return log(2.0*fX);
}
The function acosh is not defined for x<1. The function ScArcCosHyp()
pushes an IllegalArgument and do not call acosh in that cases.
Do I need any kind of error handling in my rtl_math_acosh? The function
acosh might be called from somewhere else, not only from ScArcCosHyp.
kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]