Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-10-25 18:12:14

From: Fernando Cacciola <fcacciola_at_[hidden]>
> From: Noah Stein <noah_at_[hidden]>
> > From: Ed Brey [mailto:edbrey_at_[hidden]]
> > ...
> > > in boost::math would be fine. Of course, I find the concept of
> > > representing an irrational number using a rational class kind of
> > > amusing, but I suppose it might have practical value.
> >
> > Maybe there should be an irrational number class? I should think it would
> > only take minutes for somebody to come up with an exact representation of
> pi
> > or e in such a class. :-)
> >
> Both rational and irrational numbers (real numbers) are typically
> approximated with floating point types.
> And typically, there is a class named something like big_float or real to
> support extended or arbitrary precision real number approximations.
> We have a bigint, a rational, even an interval (it's in the files section);
> so what we need is a big_float<> class. Anyone?
> Seriously, I think we might really need a big_float<> class before users
> start to believe that rational<bigint> can be used as a replacement for long
> double for higher precision needs; this isn't the correct usage of a
> rational class.
> BTW, there isn't any *exact* representation of pi,e, etc.. because they
> don't have an *exact* value :)

I think Noah was joking, but your points are well taken.

I was using constant<rational>(pi) just as an example, and
constant<mongo_real>(pi) would do just as well.

Boost list run by bdawes at, gregod at, cpdaniel at, john at