[gambit-list] Which function in libm are portable enough to assume that they will be on all platforms?
feeley at iro.umontreal.ca
Thu Oct 31 17:09:41 EDT 2013
On Oct 31, 2013, at 4:21 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
> 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
> 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:
> The following are trivial (maybe we already have them, I haven't checked).
> The following we don't have:
> ln1p ; ln1p(x)=ln(1+x)
> 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.)
Given that the hyperbolic functions are interesting on their own, I'm enclined to add them to Gambit regardless of their use for implementing complex asin and acos. Then we can experiment to see if it is worthwhile using them for complex asin and acos.
Can you give me a consistent set of the math functions I should add? If sinh is added then cosh and tanh should be added as well, etc
More information about the Gambit-list