max() value for mpfr
Thu, 31 Jul 2003 08:28:04 +1000
Derrick Bass <firstname.lastname@example.org> writes:
> I'm using the MPFR C++ wrapper. Some code I'm interfacing to expects
> that numeric_limits<T> will be defined for the class. In particular, I
> need max() which is a number >= to any representable number. I realize
> that for a variable precision class this is a little ill-defined, but
> in my application, I'm actually keeping the precision the same for all
> the mpfr_class's I use. So, given a particular precision, how do I
> construct the largest number representable at that precision?
I guess there's no function for that directly, but it'll be an
exponent MPFR_EMAX_DEFAULT, and all ones in the mantissa
(ie. 0.111...111 in binary).