[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gmp-discuss
Subject:    max() value for mpfr
From:       user42 () zip ! com ! au (Kevin Ryde)
Date:       2003-07-30 22:28:04
Message-ID: 878yqf3b0r.fsf () zip ! com ! au
[Download RAW message or body]

Derrick Bass <derrick@caltech.edu> 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).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic