Boost logo

Boost :

From: Peder Holt (peder.holt_at_[hidden])
Date: 2005-10-26 01:09:45


On 10/25/05, Cromwell Enage <sponage_at_[hidden]> wrote:
> --- Peder Holt wrote:
> > I think the results are to be expected, if I
> > understand them correctly.
>
> Okay.
>
> > 1. BOOST_MPL_MATH_DOUBLE uses built-in double
> > arithmetics to extract the mantissa and the
> > exponent at compile time. Since the mantissa of
> > double is limited to 52 bits, it uses rounding to
> > get a best match.
> >
> > 2. string_c_to_double on the other hand has ~60 bits
> > available.
>
> Should I then change big_integral_mantissa,
> whole_part, and rational_part to account for the extra
> bits?

It wouldn't hurt, I guess.
More accurate results should make more people happy.

Peder.

>
> > The only way to get these results to match, is to
> > reintroduce the strict rounding to 52 bits on all
> > double_'s but this would lead to a less-than-52-bit
> > precision on mathematical functions such as sine.
> >
> > We could of course also limit string_c_to_double's
> > built in precision to 52 bits, but it seems such a
> > waste to throw away the extra information :)
>
> Indeed!
>
> Cromwell D. Enage
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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