Skip to content

Commit d66a2c3

Browse files
committed
as x is finite, regular comparisons can be used here
1 parent 6cec4b8 commit d66a2c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/mathmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,13 @@ m_cospi(double x)
306306
return cos(x);
307307
}
308308
x = fabs(x - 2.0 * round(0.5 * x));
309-
if (islessequal(x, 0.25)) {
309+
if (x <= 0.25) {
310310
return cos(pi * x);
311311
}
312312
if (x == 0.5) {
313313
return 0.0;
314314
}
315-
if (islessequal(x, 0.75)) {
315+
if (x <= 0.75) {
316316
return sin(pi * (0.5 - x));
317317
}
318318
return -cos(pi * (1.0 - x));

0 commit comments

Comments
 (0)