Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion libm/src/math/rem_pio2_large.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* ====================================================
*/

use super::{floor, scalbn};
use super::scalbn;

// initial value for jk
const INIT_JK: [usize; 4] = [3, 4, 4, 6];
Expand Down Expand Up @@ -223,6 +223,14 @@ const PIO2: [f64; 8] = [
/// independent of the exponent of the input.
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub(crate) fn rem_pio2_large(x: &[f64], y: &mut [f64], e0: i32, prec: usize) -> i32 {
// FIXME(rust-lang/rust#144518): Inline assembly would cause `no_panic` to fail
// on the callers of this function. As a workaround, avoid inlining `floor` here
// when implemented with assembly.
#[cfg_attr(x86_no_sse, inline(never))]
extern "C" fn floor(x: f64) -> f64 {
super::floor(x)
}

let x1p24 = f64::from_bits(0x4170000000000000); // 0x1p24 === 2 ^ 24
let x1p_24 = f64::from_bits(0x3e70000000000000); // 0x1p_24 === 2 ^ (-24)

Expand Down
Loading