30 Mar
2015
30 Mar
'15
6:15 p.m.
If I understand correctly, cpp_rational is constructible from double but rational isn't? It is documented, so it's ok, but it may still confuse some users.
Correct. Conversion works in the multiprecision case because someone asked for it, and the integers are large enough that we shouldn't have to worry about overflow etc. In the non-multiprecision case, there are plenty of doubles which can't be converted to a rational of (built in) integers. And of course (possibly 128 bit) long doubles are even more of an issue. John.