Boost logo

Boost :

From: Hubert Holin (Hubert.Holin_at_[hidden])
Date: 2005-04-07 09:09:17


Somewhere in the E.U., le 07/04/2005

   Bonjour

In article <00a701c539f1$91514090$55270d52_at_fuji>,
 "John Maddock" <john_at_[hidden]> wrote:

> > 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

         Arrgh! I only coded the complex versions of sinc and sinhc!

> (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.

         I will look at your implementation tomorrow, but I feel it
would perhaps be simpler to replace my files with yours or merge the
implementations (specialization for scalars and specialization for
complexes), and update the library documentation. I'd also like to add
valarray support, at least for the scalars (pending the language
decisions concerning layout guaranties), at some point, though rereading
the discussion of two years ago this may prove contentious.

         At any rate, I believe this is an enrichment of an existing,
accepted, library, and as such does not warrant a separate review.
Adding valarray support might warrant one, though, since there has been
controversy (and thus the opportunity for improvement thru review).

> >> In the mean time these algorithms can be downloaded as part of the TR1
> >> library here:
> >> http://boost-sandbox.sourceforge.net/vault/index.php?&direction=0&order=&di
> >> rec
> >> tory=tr1
> >
> > (not showing up yet...)
>
> Works for me... try going to http://boost-sandbox.sourceforge.net/vault/ and
> then navigating down into the tr1 directory.

      Got it! The problem I encountered (and which is still here) is
that chose the "Sandbox CVS" link from the page at
"http://www.boost.org", and then the "via the web" link, which lead me
to a page at "http://www.boost.org/more/mailing_lists.htm#sandbox",
which, going from there to "boost" and then "tr1" only locates "tuple".
Choosing the "Sandbox Files" link from the page at
"http://www.boost.org" works correctly however.

> >> 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,
>
> John.

         Hubert


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk