[llvm-dev] X86_FP80 in APFloat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] X86_FP80 in APFloat

Daniel Sanders via llvm-dev

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).

Thanks,
Akash


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] X86_FP80 in APFloat

Daniel Sanders via llvm-dev
Hi Akash,

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

Cheers,
Ehud.

On Wed, Jan 22, 2020 at 6:56 AM Akash Banerjee via llvm-dev <[hidden email]> wrote:

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).

Thanks,
Akash

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev