Re:Pretty.c
by vbezhenar on Thursday October 24, 2024 @02:21AM
(#41932502)
This is wrong code. It only works somewhat correctly when a and b around 1.
[ Parent
| on HN ]
Yeah, should be scaled like |x - y| <= ε * max(|x|, |y|)
Will do.
If both terms are infinites and of same sign, subtraction will give NaN and it will fail.
How is that a problem? infinities shouldn't be considered equal