Boost logo

Boost :

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

"Joel Eidsath" <jeidsath_at_[hidden]> wrote in message
>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

Andy Little

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