]> git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/libm/src/math/fdimf.rs
New upstream version 1.29.0+dfsg1
[rustc.git] / src / libcompiler_builtins / libm / src / math / fdimf.rs
1 use core::f32;
2
3 #[inline]
4 pub fn fdimf(x: f32, y: f32) -> f32 {
5 if x.is_nan() {
6 x
7 } else if y.is_nan() {
8 y
9 } else {
10 if x > y {
11 x - y
12 } else {
13 0.0
14 }
15 }
16 }