compiler_builtins/math/libm_math/
floor.rs1#[cfg(f16_enabled)]
5#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
6pub fn floorf16(x: f16) -> f16 {
7 return super::generic::floor(x);
8}
9
10#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
14pub fn floor(x: f64) -> f64 {
15 select_implementation! {
16 name: floor,
17 use_arch: all(target_arch = "wasm32", intrinsics_enabled),
18 use_arch_required: all(target_arch = "x86", not(target_feature = "sse2")),
19 args: x,
20 }
21
22 return super::generic::floor(x);
23}
24
25#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
29pub fn floorf(x: f32) -> f32 {
30 select_implementation! {
31 name: floorf,
32 use_arch: all(target_arch = "wasm32", intrinsics_enabled),
33 args: x,
34 }
35
36 return super::generic::floor(x);
37}
38
39#[cfg(f128_enabled)]
43#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
44pub fn floorf128(x: f128) -> f128 {
45 return super::generic::floor(x);
46}