Forgot to say, this is also issue: https://svn.boost.org/trac/boost/ticket/10244 (although that trac issue doesn't actual deal with all the problems). There are also some other open issues that look like they're low hanging fruit, but one thing at a time... John. On 30/03/2015 12:44, John Maddock wrote:
I have a bunch of PR's against Rational, which of course is basically unmaintained. I'd be grateful if a second pair of eyes (at least) could take a look before I start agitating for someone to merge them ;)
Each of the four, builds on the previous one(s).
Three are basically trivial:
https://github.com/boostorg/rational/pull/1/files https://github.com/boostorg/rational/pull/2/files https://github.com/boostorg/rational/pull/3/files
The final one is much more complex, and disables "accidental" conversion from float to rational (which otherwise proceeds via truncation to integer first).
As you can see from the commit history, I've had quite a few attempts at getting the final one correct. I believe it is now, doesn't break anything in Boost except, as noted in the discussion, Boost.Geometry, which relies on an unsafe float to rational conversion - Geometry's authors are aware of the issue here: https://github.com/boostorg/geometry/commit/c992eb61e8ef9e90fdae403ac6ff1eea....
So.... I'm interested in both eyeball-look-throughs from seasoned Boosters, but also feedback from Rational's users, and verification that it doesn't break end user code - other than unsafe conversions of course. If you just want the updated header to test, you can grab it from here: https://raw.githubusercontent.com/jzmaddock/rational/no-float-convert/includ...
Many thanks! John.