Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multiprecision] Get mantissa of a float
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-05-04 03:26:30


> I'm new to the Multiprecision library, and am trying to extract the
> mantissa from a float. Using cpp_bin_float, it's easy to get the
> exponent, but how can I get the mantissa in a normalized form
> (1.xxxxxxxxxx)? I tried messing with the limbs, they contain large
> powers of two, but I couldn't interpret that.
>
frexp will give you the exponent and mantissa, same as for regular
floating point types, is that what you wanted?

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net