Can someone confirm this fix (for bug #798357)?

I just checked in a fix for bug #798357, which concerns boost::rational's operator< overflowing. Can someone confirm the fix, especially on wacky compilers (like MSVC 6)? The new test includes large numbers that are relatively prime, which the old code couldn't handle. (The old code hoped that partial cancellation would happen to lessen the component values.) I want to close out the bug. The old code used cross multiplication before integer comparisons, which can overflow. The new code manually does the Euclidian GCD algorithm, since its intermediate results give the continued fraction expansion. The components of that expansion are compared, with the regular code ending when corresponding components differ, and special code when one sequence ends early (or both end simultaneously without a difference). The changes are in "rational.hpp", "rational_test.cpp", and "rational.html" (the performance descriptions for comparisons have changed). -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

On 10/31/06 11:34 AM, "Daryle Walker" <darylew@hotmail.com> wrote:
I just checked in a fix for bug #798357, which concerns boost::rational's operator< overflowing. Can someone confirm the fix, especially on wacky compilers (like MSVC 6)? [SNIP] The changes are in "rational.hpp", "rational_test.cpp", and "rational.html" (the performance descriptions for comparisons have changed).
Since no one has responded (last I've checked), I've finalized the bug report. I also finalized patches #1434821 (which my bug fix also fixed) and #1438991 (which was a duplicate of the bug). The fixes are currently on the HEAD branch. Should these fixes be imported to the 1.34 branch? I do _not_ know how to do this if required. If someone else tries it: I'm going to be fixing some other bugs, which may involve breaking changes, so don't blindly copy the HEAD to 1.34 without checking the versions. (The versions should be 1.19 of "rational.hpp", 1.11 of "rational.html", and 1.22 of "rational_test.cpp".) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
participants (1)
-
Daryle Walker