max() value for mpfr

Derrick Bass derrick@caltech.edu
Wed, 30 Jul 2003 12:30:33 -0700


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?

Derrick Bass