|
Boost Users : |
Subject: Re: [Boost-users] [Multiprecision] Get mantissa of a float
From: Leonardo Yvens (leoyvens_at_[hidden])
Date: 2015-05-04 08:48:16
That's exactly it, it seems I missed that basic function. Thanks!
Leo
On Mon, May 4, 2015 at 4:26 AM, John Maddock <jz.maddock_at_[hidden]>
wrote:
>
> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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