Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-04-05 10:05:00

> FWIW, asinh, acosh and atanh are already in Boost! If you wish, I
> can retire them (though I planed to add valarray support, I even printed
> a few days ago the discussion which had taken place on this two years
> (ahem) ago...).

I wouldn't dream of retiring them: however your implementations make
assumptions that are only true for scalar types, and not complex numbers
(like calling numeric_limits<T>::epsilon() and abs), my versions are
strictly complex-number only. In other words they should complement each
other. The other issue, is that calculating the real and imaginary parts
separately is more accurate than treating the complex number "like a scalar"
and doing it the obvious way.

>> In the mean time these algorithms can be downloaded as part of the TR1
>> library here:
>> tory=tr1
> (not showing up yet...)

Works for me... try going to and
then navigating down into the tr1 directory.

>> This algorithm is part of C99, but by no means all compilers support it
>> yet,
>> I used a Taylor series expansion for small x: I'm aware that there are
>> much
>> more efficient methods, but optimizing compilers completely trash the
>> logic
>> of these (Intel C++ proved to be particularly bad).
> I had planed to work on it (and a few related such as expm1...)
> something liketwo years ago and had planed to add it to the same special
> functions library. They really are important.

Agreed, it's just a pity that some compilers mangle the floating point logic
so badly :-(

Thanks for the interest,


Boost list run by bdawes at, gregod at, cpdaniel at, john at