News for hackers. Stuff that matters.
Re:Pretty.c by defrost on Thursday October 24, 2024 @01:56AM (#41932353)
Is What Every Computer Scientist Should Know About Floating-Point Arithmetic wrong ??!!

addendum: why are obviously rhetorical questions are taken so literally here?

Re:Pretty.c by ipsum2 on Thursday October 24, 2024 @03:44AM (#41933066)
It's meant as both humorous and a nerd snipe :)
Re:Pretty.c by leansensei on Thursday October 24, 2024 @02:22AM (#41932505)
Because text doesn't convey sarcastic voice tonality, so the intent is far from obvious.
Re:Pretty.c by defrost on Thursday October 24, 2024 @02:35AM (#41932583)
Sarcastic? Okay, if you say so.

Picking out an obvious define function that compares a float with a float sum of that nature should indicate an good understanding of why that might be called wizardry and deserving of a second look.

Hats off to the peer comment that suggested scaling against epsilon rather than simpliy regurging the substitution "as was" from the header.

The scaling is better in general, optional in some specific contexts.