Boost logo

Boost :

Subject: Re: [boost] [Review Request] Multiprecision Arithmetic Library
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-04-15 13:40:29


> Both sin and mysin(pi/4) output
> 7.0710678118654752440084436210484903928483593768847403658833986900e-01 for
> me - and my calculator agrees :-)

>I guess I'm merely talking about the HTML documentation shown in
>the link below. But maybe it's already been fixed elsewhere:
>https://svn.boost.org/svn/boost/sandbox/big_number/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/fp_eg/poly_eg.html
>
>The example code in the HTML documentation uses mysin(1).
>*Emphasize*: The argument is 1.

Doh! My bad, looking in the wrong place and forgot to change the argument to
pi/4, will correct shortly.

>By the way, I looked at the compiler-generated assembly for
>that polynomial expansion using template expressions
>under x64 with VisualStudio2010. My jaw dropped to the floor!
>It's baffling what the compiler does with expression templates
>in combination with inlining, loop unrolling, constant folding, etc.
>I would like to to take a closer look at this and really comprehend
>the optimization potential.
>The state of C++ compiler technology today is truly impressive!
>I can hardly wait for VS2012 support for some of the new stuff.

Nod, getting all those one-line expression templates expanded inline is key
here, and yes, compilers are getting pretty impressive at handling this
stuff!

Cheers, John.


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