(self)
| 139 | } |
| 140 | #[inline] |
| 141 | fn wasm_nearest(self) -> f32 { |
| 142 | if self.is_nan() { |
| 143 | return f32::NAN; |
| 144 | } |
| 145 | #[cfg(feature = "std")] |
| 146 | if !cfg!(windows) && !cfg!(target_arch = "riscv64") { |
| 147 | return self.round_ties_even(); |
| 148 | } |
| 149 | let round = libm::roundf(self); |
| 150 | if libm::fabsf(self - round) != 0.5 { |
| 151 | return round; |
| 152 | } |
| 153 | match round % 2.0 { |
| 154 | 1.0 => libm::floorf(self), |
| 155 | -1.0 => libm::ceilf(self), |
| 156 | _ => round, |
| 157 | } |
| 158 | } |
| 159 | #[inline] |
| 160 | fn wasm_maximum(self, other: f32) -> f32 { |
| 161 | // FIXME: replace this with `a.maximum(b)` when rust-lang/rust#91079 is |
no test coverage detected