Skip to content

Commit e369b88

Browse files
quaternicfolkertdev
authored andcommitted
substitute truncation for flooring in rempio2_large
1 parent e8cfc94 commit e369b88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libm/src/math/rem_pio2_large.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* ====================================================
1212
*/
1313

14-
use super::{floor, scalbn};
14+
use super::{trunc, scalbn};
1515

1616
// initial value for jk
1717
const INIT_JK: [usize; 4] = [3, 4, 4, 6];
@@ -290,7 +290,7 @@ pub(crate) fn rem_pio2_large(x: &[f64], y: &mut [f64], e0: i32, prec: usize) ->
290290

291291
/* compute n */
292292
z = scalbn(z, q0); /* actual value of z */
293-
z -= 8.0 * floor(z * 0.125); /* trim off integer >= 8 */
293+
z -= 8.0 * trunc(z * 0.125); /* trim off integer >= 8 */
294294
n = z as i32;
295295
z -= n as f64;
296296
ih = 0;

0 commit comments

Comments
 (0)