[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Suggestion needed on test failures due to double arithmetics



On Thu, Nov 25, 2021 at 01:45:49PM +0100, Giulio Paci wrote:
> Moreover I am still wondering if the compiler behavior is correct in this
> case and why it is so unstable. 
It's correct when you don't care about the amount of precision, and it's
unstable for the reasons described in gcc(1) for the options you
mentioned, e.g. "This option prevents undesirable excess precision on
machines such as the 68000 where the floating registers (of the 68881)
keep more precision than a "double" is supposed to have.  Similarly for
the x86 architecture. For most programs, the excess precision does only
good, but a few programs rely on the precise definition of IEEE floating
point.", as in different circumstances the temporary values will have or
not have the x87 80-bit precision, leading to different calculation
results.

-- 
WBR, wRAR

Attachment: signature.asc
Description: PGP signature


Reply to: