$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Joel Eidsath (jeidsath_at_[hidden])
Date: 2005-09-11 07:40:54
>I didn't see a cost savings (or penalty) there.
>
I don't even know why I need to say this. For one thing, just look the
GCD call at the creation of every boost::rational. You must understand
the costs involved there when numbers get big.
>It does something akin to
>the built-in floating-point types on common platforms (which are IEEE-754)
>with a binary mantissa and exponent. It's a tradeoff, giving up arbitrary
>denominators for quicker manipulation.
>
>
Explain how you'd implement the square root function for a
boost::rational type class. (Or a host of other functions.) Lots of
calls to set_precision, I expect.
Joel Eidsath