|
Boost : |
From: Moore, Paul (paul.moore_at_[hidden])
Date: 2000-11-29 04:30:02
From: David Abrahams [mailto:abrahams_at_[hidden]]
> P.S. The precedent on most systems I can find has also
> been to do an exact conversion (with unlimited-precision
> integers where neccessary) when a rational is constructed
> from a float. I have the algorithm for that, if you want
> it.
That would save me finding it :-) With that, I'll add two functions,
tentatively named rationalize_exact() and rationalize_simplest(), based on
the two cases we have seen.
Thanks,
Paul
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk