News for hackers. Stuff that matters.
Re:Pretty.c by stabbles on Thursday October 24, 2024 @02:26AM (#41932525)
Yeah, should be scaled like |x - y| <= ε * max(|x|, |y|)
Re:Pretty.c by aartaka on Thursday October 24, 2024 @07:11AM (#41934350)
Will do.
Re:Pretty.c by jffhn on Thursday October 24, 2024 @08:01AM (#41934672)
If both terms are infinites and of same sign, subtraction will give NaN and it will fail.
Re:Pretty.c by listeria on Thursday October 24, 2024 @10:08AM (#41935646)
How is that a problem? infinities shouldn't be considered equal
Re:Pretty.c by jffhn on Thursday October 24, 2024 @12:12PM (#41936911)
For IEEE 754, and in Java for example, they are. Only NaN is not equal to itself (and different from itself).