|
Boost : |
From: Peder Holt (peder.holt_at_[hidden])
Date: 2005-09-25 07:38:11
On 9/24/05, David Abrahams <dave_at_[hidden]> wrote:
> Peder Holt <peder.holt_at_[hidden]> writes:
>
> > What should we do about the accuracy of double_ operations?
> >
> > The implementation of plus,minus,times and divide mimics the behaviour
> > of the runtime equivalent, double.
>
> On which implementation of C++?
Hmm. Good question :) VC8.0 beta and VC7.1
>
> > This means that the mantissa is trunkated from 61 to 52 bit for
> > every fundamental operation. The result of this, is that complex
> > functions such as sine and exponential will differ from their
> > runtime counterpart, unless a specialization is made for
> > double_. The problem would disappear if we allow calculations with
> > double_ to be more accurate than calculations with double. Is this a
> > problem?
>
> It doesn't sound like your correspondence with runtime results can
> possibly be portable anyway, can it?
I haven't studied the results from other compilers, but from reading
other posts on the issue, it seems that you are right, floating point
operations are implementation defined anyway, so I'll stick to keeping
the 61 bits.
Peder
>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.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