[gambit-list] Which function in libm are portable enough to assume that they will be on all platforms?
Bradley Lucier
lucier at math.purdue.edu
Thu Oct 31 16:21:27 EDT 2013
On 10/31/2013 11:08 AM, Marc Feeley wrote:
> In your (future) implementation of complex asin and acos which is
> based on flsinh, etc, I am asking if the precision of complex asin and
> acos will be no worse than what it is currently if flsinh, etc are
> defined using the portable naive implementation. Marc
Marc:
I still can't parse the sentence, sorry, my broken leg isn't healing
properly and I can't always think straight right now.
To be more concrete, let me list the floating-point functions that Kahan
uses in his implementations:
The following we have:
sqrt
arctan
ln
tan
The following are trivial (maybe we already have them, I haven't checked).
copysign
logb
scaleb
The following we don't have:
ln1p ; ln1p(x)=ln(1+x)
arcsinh
sinh
These floating-point functions need to be computed accurately for the
complex functions to be computed accurately.
There is already an algorithm for something like ln1p in the last case
of the cond in exact-log in the definition of ##log, and we may need to
have Scheme versions of (ln1p, arcsinh, and sinh) to calculate accurate
values of the complex functions for exact arguments (Kahan considers
only floating-point arguments, so there are limits on how big and how
small they can be).
So I need only flln1p, flasinh, and flsinh. Which is not so much. (But
which may be more than what Windows provides, according to Joe's email.)
Brad
More information about the Gambit-list
mailing list