Skip to content

Commit 32a6bbd

Browse files
committed
fixed modfl
1 parent 088ede2 commit 32a6bbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libc/modfl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ long double modfl(long double x, long double *integral_part) {
1616
case FP_NORMAL:
1717
}
1818
long double trunc_x = truncl(x);
19-
*integral_part = x;
19+
*integral_part = trunc_x;
2020
// result will be exact, and should not raise exceptions
2121
return x - trunc_x;
2222
}

0 commit comments

Comments
 (0)