Move some numeric trait logic to default implementations
There are a handful of functions we can move out of the macro and to the numeric traits as default implementations; do that here. Additionally, add some bounds that make sense for completeness.
This commit is contained in:
committed by
Trevor Gross
parent
fcf8670668
commit
9a2774a0ae
@@ -314,7 +314,7 @@ where
|
||||
// Make sure that the signs are the same before checing ULP to avoid wraparound
|
||||
let act_sig = actual.signum();
|
||||
let exp_sig = expected.signum();
|
||||
ensure!(act_sig == exp_sig, "mismatched signs {act_sig} {exp_sig}");
|
||||
ensure!(act_sig == exp_sig, "mismatched signs {act_sig:?} {exp_sig:?}");
|
||||
|
||||
if actual.is_infinite() ^ expected.is_infinite() {
|
||||
bail!("mismatched infinities");
|
||||
|
||||
Reference in New Issue
Block a user