Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-11-28 09:17:52


----- Original Message -----
From: "Moore, Paul" <paul.moore_at_[hidden]>

> Sadly, (a C++ implementation without overflow checks of)
rationalize(1.0/49)
> loops. To get it to work needs either overflow detection, or checks
whether
> a1=a && b1=b and the like. I can't convince myself that the looping
> behaviour could not be of arbitrary length, offhand. And non-termination
in
> the conversion function is not acceptable :-(

The checks you mention sound plausible, though. You know, I'd be surprised
if Knuth (or some other obvious source) didn't contain a reliable version of
this algorithm. It's probably not a good idea for hacks like me (us?) to go
flailing about in numerics land without the theoretical foundation ;-)

-Dave


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