[Cfp-interest 2382] Re: FLT_EVAL_METHOD

Steve (Swift) Canon scanon at apple.com
Mon Feb 14 18:19:52 PST 2022


On Feb 14, 2022, at 8:01 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Tue, 15 Feb 2022 11:15:23 +1100 (AEDT) Damian McGuckin wrote:
>> 
>> These days, compilers seem to have it as 0, unless changed when you invoke the compiler. Was it always thus or did compilers used to have it set as 1 or 2?
> 
> For Intel x87 FPU, it should be set as 2 (since everything is done as 80-bit long double).

At least when precision control is set to extended-precision in FPCR by default. I believe that some systems set it to double-precision (0x0080), which doesn’t map to any of the normal FLT_EVAL_METHOD modes, because operations are evaluated with 53 bits of precision but the extended exponent range in this mode.

– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20220214/6f0ba8b2/attachment.htm>


More information about the Cfp-interest mailing list