News for hackers. Stuff that matters.
Re:Why does this code execute more slowly after strength-red... by ascar on Sunday May 29, 2022 @03:00PM (#31551799)
Your points are factually correct, but in practice not a big concern, if your floating point value is much more precise than necessary for the numbers used.

E.g. if you use doubles for the range of 32bit integers even adding 1.0 2 billion times to 2 billion still ends up at 4 billion. Even adding 1.0 20 billion times to 20 billion ends up at 40 billion. Now adding 0.1 20 billion times to 2 billion ends up 1908 short on my CPU, i.e. about 19080 absorptions/rounding errors occured. You need some serious differences and amount of operations to actually trigger errors.

Re:Why does this code execute more slowly after strength-red... by kzrdude on Monday May 30, 2022 @02:56AM (#31556177)
You're talking about the best case, but we need to take the reasonable worst cases into account, where x + y nearly cancel etc.