Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2005-09-06 10:55:09


"Joel Eidsath" <jeidsath_at_[hidden]> wrote in message
news:431C91C1.3030502_at_gmail.com...
>I think that I need to define the mathematical concept of rational
> numbers here. A rational number is any number that _can_ be written as
> a / b. But a rational class does not have to be stored as a separate
> numerator and denominator. In an arbitrary precision library, you
> definitely do not want to implement rational numbers as a struct with a
> numerator and denominator.

>
> Examples of basic rational number types in C++: float, double, etc.

On the contrary, conversion from rational to float is an example of a "lossy
conversion".

regards
Andy Little


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