Boost logo

Boost :

Subject: Re: [boost] [multiprecision] General/design query about which conversions should be implicit/explicit
From: John Maddock (boost.regex_at_[hidden])
Date: 2014-05-31 12:32:30

>> I have an open bug report
>> that requests that
>> conversions from floating point to rational multiprecision-types be
>> made implicit (currently they're explicit).
> But the doc says they are implicit.

Point taken.

>> 2) Floating point values can result in arbitrarily large integer parts
>> to the rational, effectively running the machine out of memory.
>> Arguably the converting constructor should guard against that, though
>> frankly exactly how is less clear :-(
> Er, that might be true if you include mpfr numbers in "floating point",
> but if you only consider double, the maximum size of the numerator is
> extremely limited. Even for a binary128 it can't be very big (about 2ko).

Ah, my bad, I was thinking the exponent would make the number a lot
larger than it actually is.

Thanks, John.

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