diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/libm-0.1.4/src/math/fabsf.rs | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libm-0.1.4/src/math/fabsf.rs')
-rw-r--r-- | vendor/libm-0.1.4/src/math/fabsf.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/vendor/libm-0.1.4/src/math/fabsf.rs b/vendor/libm-0.1.4/src/math/fabsf.rs deleted file mode 100644 index 5942d983a..000000000 --- a/vendor/libm-0.1.4/src/math/fabsf.rs +++ /dev/null @@ -1,16 +0,0 @@ -/// Absolute value (magnitude) (f32) -/// Calculates the absolute value (magnitude) of the argument `x`, -/// by direct manipulation of the bit representation of `x`. -#[inline] -#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] -pub fn fabsf(x: f32) -> f32 { - // On wasm32 we know that LLVM's intrinsic will compile to an optimized - // `f32.abs` native instruction, so we can leverage this for both code size - // and speed. - llvm_intrinsically_optimized! { - #[cfg(target_arch = "wasm32")] { - return unsafe { ::core::intrinsics::fabsf32(x) } - } - } - f32::from_bits(x.to_bits() & 0x7fffffff) -} |