X86_FP80 in APFloat

Hi all,

I want to extract the actual value of an X86_FP80 APFloat Constant. Is there any API with which I can get the value of mantissa and exponent?

I tried ConvertToHexString, but for x86_fp80 0xK8FFFC000000000000000, it just returns nan, instead I want the actual byte information.

There are APIs like convertToDouble and convertToFloat for APFloat single and double precision, I am looking for something similar for extended precision(X86_FP80).


Hi Akash,

I guess your best option is to use APFloat::bitcastToAPInt(), which returns the integer representation of the underlying bits.