explain mysterious addition in float minimum/maximum

This commit is contained in:
Ralf Jung 2023-09-19 10:06:22 +02:00
parent af78bae565
commit 028c78c6c7
2 changed files with 2 additions and 0 deletions

View File

@ -957,6 +957,7 @@ impl f32 {
} else if self == other {
if self.is_sign_negative() && other.is_sign_positive() { self } else { other }
} else {
// At least one input is NaN. Use `+` to perform NaN propagation and quieting.
self + other
}
}

View File

@ -968,6 +968,7 @@ impl f64 {
} else if self == other {
if self.is_sign_negative() && other.is_sign_positive() { self } else { other }
} else {
// At least one input is NaN. Use `+` to perform NaN propagation and quieting.
self + other
}
}