On Thu, Apr 20, 2023 at 04:02:02PM +0200, Jakub Jelinek via Gcc-patches wrote: > So, I wrote following test. Slightly adjusted to see more info: x86_64-linux glibc 2.35: for i in FLOAT DOUBLE LDOUBLE FLOAT128; do for j in TONEAREST UPWARD DOWNWARD TOWARDZERO; do gcc -D$i -DROUND=FE_$j -g -O1 -o /tmp/sincos{,.c} -lm; /tmp/sincos || echo $i $j; done; done sin -0x1.2d97c800000000000000p+2 0x1.00000200000000000000p+0 sin -0x1.2d97c800000000000000p+2 0x1.00000200000000000000p+0 sin 0x1.f9cbe200000000000000p+7 0x1.00000200000000000000p+0 FLOAT UPWARD cos -0x1.f9cbe200000000000000p+8 -0x1.00000200000000000000p+0 sin -0x1.f9cbe200000000000000p+7 -0x1.00000200000000000000p+0 sin 0x1.2d97c800000000000000p+2 -0x1.00000200000000000000p+0 sin 0x1.2d97c800000000000000p+2 -0x1.00000200000000000000p+0 cos 0x1.f9cbe200000000000000p+8 -0x1.00000200000000000000p+0 cos 0x1.f9cbe200000000000000p+8 -0x1.00000200000000000000p+0 FLOAT DOWNWARD sparc-sun-solaris2.11 results are too large to post in detail, but are sin -0x1.2d97c7f3321d20000000p+2 0x1.00000000000010000000p+0 ... sin 0x1.f6a7a29553c450000000p+2 0x1.00000000000010000000p+0 DOUBLE UPWARD sin -0x1.f6a7a2955385e0000000p+2 -0x1.00000000000010000000p+0 ... sin 0x1.2d97c7f3325b90000000p+2 -0x1.00000000000010000000p+0 DOUBLE DOWNWARD where all the DOUBLE UPWARD values have 0x1.00000000000010000000p+0 results and all DOUBLE DOWNWARD values -0x1.00000000000010000000p+0. So, I think that is 1ulp in all cases in both directions for -frounding-math. Jakub