Remix.run Logo
▲ dzaima 5 hours ago

> gcc, however, always defines FLT_ROUNDS to 1

Well, considering that gcc doesn't support the FENV_ACCESS pragma, and as such all fesetround calls are always UB, it is valid for it to act as if the rounding mode never changes from the default :)

▲uecker 2 hours ago | parent [-]

Well, it is not ok to not support FENV_ACCESS though.

▲amszmidt 41 minutes ago | parent [-]

I skimmed the standard and POSIX, but couldn’t find anything that an implementation is required to support FENV_ACCESS.