Rollup merge of #115958 - RalfJung:mystery-plus, r=Mark-Simulacrum,notriddle
explain mysterious addition in float minimum/maximum Thanks to `@programmerjake` for mentioning this.
This commit is contained in:
commit
1b862186a7
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user