7 ms·
I suggest if a.abs()+b.abs() >= (a-b).abs() * 2f64.powi(48) It remains accurate for small and for big numbers. 48 is slightly less than 52.
by reacweb 5mo ago
I suggest
if a.abs()+b.abs() >= (a-b).abs() * 2f64.powi(48)
It remains accurate for small and for big numbers. 48 is slightly less than 52.
- adgjlsfhk1 5mo agothat will return incorrect answers if a=b and 2a=Inf