Boost logo

Boost :

From: Moore, Paul (paul.moore_at_[hidden])
Date: 2000-11-28 09:07:45

From: David Abrahams [mailto:abrahams_at_[hidden]]
> Actually, I'm pretty sure that isn't possible, at least not
> unless floats reach infinite precision. I take this hypothesis
> from the fact that rationalize(1.0/3) terminates because
> f == 0, not due to overflow. I don't have a quick answer to
> the overflow detection problem, though ;-(.

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 :-(


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