ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] [mpl][math] double accuracy
by Peder Holt other posts by this author
Sep 29 2005 12:08PM messages near this date
Re: [boost] toward a more modular boost | Re: [boost] [mpl][math] double accuracy
SOURCE On 9/24/05, David Abrahams <dave@[...].com>  wrote:
>  Peder Holt <peder.holt@[...].com> 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
> 

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Peder Holt
David Abrahams
Andy Little
Peder Holt
Matthias Troyer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved