wasmer/lib/emscripten/emtests/test_rounding.out
2019-01-10 21:38:10 -08:00

141 lines
4.1 KiB
Plaintext

Initial rounding mode is FE_TONEAREST
fesetround(FE_TONEAREST) returned 0, fegetround() afterwards returns FE_TONEAREST. Test results:
FE_TONEAREST: round(-4.5)=-5.0
FE_TONEAREST: round(-3.6)=-4.0
FE_TONEAREST: round(-3.5)=-4.0
FE_TONEAREST: round(-3.4)=-3.0
FE_TONEAREST: round(-2.6)=-3.0
FE_TONEAREST: round(-2.5)=-3.0
FE_TONEAREST: round(-2.4)=-2.0
FE_TONEAREST: round(-1.5)=-2.0
FE_TONEAREST: round(-0.5)=-1.0
FE_TONEAREST: round(0.0)=0.0
FE_TONEAREST: round(0.5)=1.0
FE_TONEAREST: round(1.4)=1.0
FE_TONEAREST: round(1.5)=2.0
FE_TONEAREST: round(1.6)=2.0
FE_TONEAREST: round(2.5)=3.0
FE_TONEAREST: round(3.5)=4.0
FE_TONEAREST: round(4.5)=5.0
FE_TONEAREST: roundf(-4.5)=-5.0
FE_TONEAREST: roundf(-3.6)=-4.0
FE_TONEAREST: roundf(-3.5)=-4.0
FE_TONEAREST: roundf(-3.4)=-3.0
FE_TONEAREST: roundf(-2.6)=-3.0
FE_TONEAREST: roundf(-2.5)=-3.0
FE_TONEAREST: roundf(-2.4)=-2.0
FE_TONEAREST: roundf(-1.5)=-2.0
FE_TONEAREST: roundf(-0.5)=-1.0
FE_TONEAREST: roundf(0.0)=0.0
FE_TONEAREST: roundf(0.5)=1.0
FE_TONEAREST: roundf(1.4)=1.0
FE_TONEAREST: roundf(1.5)=2.0
FE_TONEAREST: roundf(1.6)=2.0
FE_TONEAREST: roundf(2.5)=3.0
FE_TONEAREST: roundf(3.5)=4.0
FE_TONEAREST: roundf(4.5)=5.0
FE_TONEAREST: rint(-4.5)=-4.0
FE_TONEAREST: rint(-3.6)=-4.0
FE_TONEAREST: rint(-3.5)=-4.0
FE_TONEAREST: rint(-3.4)=-3.0
FE_TONEAREST: rint(-2.6)=-3.0
FE_TONEAREST: rint(-2.5)=-2.0
FE_TONEAREST: rint(-2.4)=-2.0
FE_TONEAREST: rint(-1.5)=-2.0
FE_TONEAREST: rint(-0.5)=-0.0
FE_TONEAREST: rint(0.0)=0.0
FE_TONEAREST: rint(0.5)=0.0
FE_TONEAREST: rint(1.4)=1.0
FE_TONEAREST: rint(1.5)=2.0
FE_TONEAREST: rint(1.6)=2.0
FE_TONEAREST: rint(2.5)=2.0
FE_TONEAREST: rint(3.5)=4.0
FE_TONEAREST: rint(4.5)=4.0
FE_TONEAREST: rintf(-4.5)=-4.0
FE_TONEAREST: rintf(-3.6)=-4.0
FE_TONEAREST: rintf(-3.5)=-4.0
FE_TONEAREST: rintf(-3.4)=-3.0
FE_TONEAREST: rintf(-2.6)=-3.0
FE_TONEAREST: rintf(-2.5)=-2.0
FE_TONEAREST: rintf(-2.4)=-2.0
FE_TONEAREST: rintf(-1.5)=-2.0
FE_TONEAREST: rintf(-0.5)=-0.0
FE_TONEAREST: rintf(0.0)=0.0
FE_TONEAREST: rintf(0.5)=0.0
FE_TONEAREST: rintf(1.4)=1.0
FE_TONEAREST: rintf(1.5)=2.0
FE_TONEAREST: rintf(1.6)=2.0
FE_TONEAREST: rintf(2.5)=2.0
FE_TONEAREST: rintf(3.5)=4.0
FE_TONEAREST: rintf(4.5)=4.0
FE_TONEAREST: lrint(-4.5)=-4
FE_TONEAREST: lrint(-3.6)=-4
FE_TONEAREST: lrint(-3.5)=-4
FE_TONEAREST: lrint(-3.4)=-3
FE_TONEAREST: lrint(-2.6)=-3
FE_TONEAREST: lrint(-2.5)=-2
FE_TONEAREST: lrint(-2.4)=-2
FE_TONEAREST: lrint(-1.5)=-2
FE_TONEAREST: lrint(-0.5)=0
FE_TONEAREST: lrint(0.0)=0
FE_TONEAREST: lrint(0.5)=0
FE_TONEAREST: lrint(1.4)=1
FE_TONEAREST: lrint(1.5)=2
FE_TONEAREST: lrint(1.6)=2
FE_TONEAREST: lrint(2.5)=2
FE_TONEAREST: lrint(3.5)=4
FE_TONEAREST: lrint(4.5)=4
FE_TONEAREST: lrintf(-4.5)=-4
FE_TONEAREST: lrintf(-3.6)=-4
FE_TONEAREST: lrintf(-3.5)=-4
FE_TONEAREST: lrintf(-3.4)=-3
FE_TONEAREST: lrintf(-2.6)=-3
FE_TONEAREST: lrintf(-2.5)=-2
FE_TONEAREST: lrintf(-2.4)=-2
FE_TONEAREST: lrintf(-1.5)=-2
FE_TONEAREST: lrintf(-0.5)=0
FE_TONEAREST: lrintf(0.0)=0
FE_TONEAREST: lrintf(0.5)=0
FE_TONEAREST: lrintf(1.4)=1
FE_TONEAREST: lrintf(1.5)=2
FE_TONEAREST: lrintf(1.6)=2
FE_TONEAREST: lrintf(2.5)=2
FE_TONEAREST: lrintf(3.5)=4
FE_TONEAREST: lrintf(4.5)=4
FE_TONEAREST: llrint(-4.5)=-4
FE_TONEAREST: llrint(-3.6)=-4
FE_TONEAREST: llrint(-3.5)=-4
FE_TONEAREST: llrint(-3.4)=-3
FE_TONEAREST: llrint(-2.6)=-3
FE_TONEAREST: llrint(-2.5)=-2
FE_TONEAREST: llrint(-2.4)=-2
FE_TONEAREST: llrint(-1.5)=-2
FE_TONEAREST: llrint(-0.5)=0
FE_TONEAREST: llrint(0.0)=0
FE_TONEAREST: llrint(0.5)=0
FE_TONEAREST: llrint(1.4)=1
FE_TONEAREST: llrint(1.5)=2
FE_TONEAREST: llrint(1.6)=2
FE_TONEAREST: llrint(2.5)=2
FE_TONEAREST: llrint(3.5)=4
FE_TONEAREST: llrint(4.5)=4
FE_TONEAREST: llrintf(-4.5)=-4
FE_TONEAREST: llrintf(-3.6)=-4
FE_TONEAREST: llrintf(-3.5)=-4
FE_TONEAREST: llrintf(-3.4)=-3
FE_TONEAREST: llrintf(-2.6)=-3
FE_TONEAREST: llrintf(-2.5)=-2
FE_TONEAREST: llrintf(-2.4)=-2
FE_TONEAREST: llrintf(-1.5)=-2
FE_TONEAREST: llrintf(-0.5)=0
FE_TONEAREST: llrintf(0.0)=0
FE_TONEAREST: llrintf(0.5)=0
FE_TONEAREST: llrintf(1.4)=1
FE_TONEAREST: llrintf(1.5)=2
FE_TONEAREST: llrintf(1.6)=2
FE_TONEAREST: llrintf(2.5)=2
FE_TONEAREST: llrintf(3.5)=4
FE_TONEAREST: llrintf(4.5)=4
3.141593 = 3.000000 + 0.141593
-3.141593 = -3.000000 + -0.141593