Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 1ff4aad

Browse files
committed
Add newlib floorf
1 parent 033140d commit 1ff4aad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/math/floorf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const HUGE: f32 = 1.0e30;
1818
/// Return x rounded toward -inf to integral value
1919
#[inline]
2020
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
21-
pub fn floorf(x: f32) -> f32 {
21+
pub extern "C" fn floorf(x: f32) -> f32 {
2222
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
2323
// `f32.floor` native instruction, so we can leverage this for both code size
2424
// and speed.
2525
llvm_intrinsically_optimized! {
2626
#[cfg(target_arch = "wasm32")] {
27-
return unsafe { ::core::intrinsics::floorf32(x) }
27+
return unsafe { core::intrinsics::floorf32(x) }
2828
}
2929
}
3030

0 commit comments

Comments
 (0)