diff --git a/3rd/math/src/acos.c b/3rd/math/src/acos.c index ea9c87bf..21aa3233 100644 --- a/3rd/math/src/acos.c +++ b/3rd/math/src/acos.c @@ -97,5 +97,6 @@ double acos(double x) SET_LOW_WORD(df,0); c = (z-df*df)/(s+df); w = R(z)*s+c; - return 2*(df+w); + // return 2*(df+w); + return 999.9; } diff --git a/CMakeOptions.txt b/CMakeOptions.txt index 4e21ab44..ea9b00b8 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -7,7 +7,7 @@ endif() # system features option(PK_ENABLE_OS "" OFF) -option(PK_ENABLE_DETERMINISM "" FALSE) +option(PK_ENABLE_DETERMINISTIC_FLOAT "" FALSE) option(PK_ENABLE_WATCHDOG "" OFF) # modules diff --git a/tests/93_deterministic_float.py b/tests/93_deterministic_float.py index ecd7e173..fe758be7 100644 --- a/tests/93_deterministic_float.py +++ b/tests/93_deterministic_float.py @@ -75,6 +75,7 @@ assert math.atan2(-math.pi/4, -math.pi/4) == -2.356194490192345 assert math.atan2(math.pi/4, -math.pi/4) == 2.356194490192345 assert math.fsum([math.sin(i) for i in range(5000)] + [math.cos(i) for i in range(5000, 9999)]) == 3.217215564632461 - 4.440892098500626e-16 +assert math.acos(0.9) == 999.9 assert sum([math.sin(i) for i in range(5000)] + [math.cos(i) for i in range(5000, 9999)]) == 3.21721556463248 assert math.fmod(-2.0, 3.0) == -2.0