
--- Bruce Trask <Bruce.Trask@prismtech.com> wrote:
Hi Cromwell,
Hello, Bruce.
Ah, good. Someone still remembers me :)
Does it stand for 990000100000 or 990000.1? One of the reasons I held off on tackling boost::mpl::fixed is not knowing what representation is both doable in MPL and most readable to the user.
Have you had success representing floats and doubles using the boost techniques?
Success has been limited. I'm currently representing compile-time floating-point numbers in terms of fractions and mixed numbers. More numbers can be represented in exact form this way. For applications requiring moderate precision, my implementations of boost::mpl::fraction and boost::mpl::rational should suffice (though I'll have to study the recent discussions on rational operations to see if there's room for improvement). For applications requiring extreme precision (e.g. calculating PI at compile time), I've attempted to offer boost::mpl::big_integral, boost::mpl::big_fraction, and boost::mpl::big_rational as arbitrary-precision variants. It is here where I run into trouble; using MinGW 3.4.2 on an "average user"'s computer, I can barely compile a single divide operation on big_integrals, and it usually takes a half-hour to do so. I need to somehow make big_integral more efficient before tackling big_fraction and big_rational. If you weren't able to obtain my work so far, it's still at <http://groups.yahoo.com/group/boost/files/mpl_math.zip>. I'll have to update the documentation's look and feel before moving it to the new File Vault, but feel free to try it out and submit improvements.
Thanks in advance.
You're welcome.
Regards, Bruce Trask
Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

"Cromwell Enage" <sponage@yahoo.com> wrote
I'd be interested in the reasoning behind some of your decisions... What is the rationale for the 4 different types representing rational fractions? What is the rationale for making the numerator and denominator types in fraction_c? regards Andy Little
participants (2)
-
Andy Little
-
Cromwell Enage