fix linux_x64

This commit is contained in:
PrimedErwin 2025-05-22 16:57:03 +08:00
parent 62bf58dd2d
commit 81bd9e2203
3 changed files with 8 additions and 9 deletions

View File

@ -97,6 +97,5 @@ 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 999.9;
return 2*(df+w);
}

View File

@ -91,11 +91,6 @@ else()
endif()
if(UNIX AND NOT APPLE)
if(NOT PK_ENABLE_DETERMINISTIC_FLOAT)
# use platform libm
target_link_libraries(${PROJECT_NAME} m)
endif()
if(PK_ENABLE_OS)
target_link_libraries(${PROJECT_NAME} dl)
endif()
@ -112,7 +107,13 @@ endif()
############################################
if(PK_ENABLE_DETERMINISTIC_FLOAT)
target_link_libraries(${PROJECT_NAME} musl_math)
if(UNIX AND NOT APPLE)
target_link_libraries(${PROJECT_NAME} musl_math)
# use platform libm
target_link_libraries(${PROJECT_NAME} m)
else()
target_link_libraries(${PROJECT_NAME} musl_math)
endif()
endif()
if(PK_BUILD_MODULE_LZ4)

View File

@ -75,7 +75,6 @@ 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