6 ms·
This article is terrible. Referring to the Goldberg paper as "long article with loltz of formulas" in a throwaway blog post shorter than most of these comments
by fargle 7y ago
This article is terrible. Referring to the Goldberg paper as "long article with loltz of formulas" in a throwaway blog post shorter than most of these comments is telling.
The "absurd" result that [1+2 != 3] * (0.1) isn't even the problem with floating point. It's an even simpler misconception that "even" vs. "repeating" fractions are the same for base 10 vs. base 2 fractions.
So we can understand that 0.33+0.33+0.33 != 1 in decimal due to rounding. So when 0.1 (decimal) which is a truncated repeating "binary decimal" fraction isn't exact we loose our shit. But why is base 10 good and base 2 bad? Why not base 57? Clearly for any base, a truncated decimal-like fraction will be inexact for a lot of numbers. Rounding errors will add up, but this is really a binary vs. decimal issue.
More subtle are errors that grow simply because of issues specific to floating point. For example re-normalization when numbers of very different magnitudes are added or subtracted which eventually causes precision loss.
This is neither hard to understand, nor the only complication with floating point, nor is anything wrong, or bad, nor should anything be fixed in IEEE-754. This is just stuff that numeric programmers MUST understand, at least at the rudimentary level.
- brazzy 7y agoIt's telling how you call the website "terrible", and then proceed to do exactly what it does: give a basic, factual explanation why floating point math does not behave as people naively expect. No, it is not hard to understand, but it is not obvious, and in fact counterintuitive to most people. Which is why there is a need for a website like this for people to refer to intead of the Goldberg paper which is great if you actually need to do error propagation analysis on your numeric algorithm but which does not give this basic explanation and is therefore not suitable to be cited to people who are suprised that 0.1 + 0.2 != 0.3 So please explain to me how referring to the Goldberg paper as "long article with lols of formulas" is anything but factually correct and a good reason to provide an alternative?
- fargle 7y agoOK, let's try again. I gave a correct summary of what I've learned from Goldberg and elsewhere. In a short comment. This article is "terrible" because it gives a single bad example and derides a very good reference implying it's too complicated. And steals it's title. Every programmer that uses floating point should read Goldberg. That blog post is garbage. Post the real source, or an informative article, not junk.
- brazzy 7y ago> I gave a correct summary of what I've learned from Goldberg and elsewhere. In a short comment. So did I on a small website (yes, I'm the author). It's a website. Not an article. Not a blog. There is more than the title page, which seems to be the only thing you've looked at. > This article is "terrible" because it gives a single bad example Which example? What makes it bad? > and derides a very good reference implying it's too complicated. I absolutely do not "deride" the Goldberg paper, and it is too complicated for people without a CS background. That doesn't mean there's anything wrong with the paper, or with those people. There is something wrong with kneejerk-posting a link to the paper as an RTFM to basic questions about floating point behaviour. My intention was to provide a better resource for those cases. > And steals it's title. Don't be ridiculous. I use the format of the title, which lots of people do (it's basically become a meme now, not sure if Goldberg was the first to use it either), with a critical difference that you seem to have missed: Goldberg adresses his paper to "every Computer Scientist", I address my website to "every programmer". Different audiences. > Every programmer that uses floating point should read Goldberg. Maybe. But it is not a good introduction. > That blog post is garbage. Post the real source, or an informative article, not junk. You have still not been able to explain what is wrong with it. I am beginning to think you have serious problems with reading comprehension.
- fargle 7y ago> So did I on a small website... I was responding to you saying that a comment in a forum that I made was "doing the same thing" as your small website. But it's not equivalent. I didn't make a website, not a paper. I didn't post it as a reference for the community. I am making, what I hope you understand, is a good faith critique. When the critique written in 3 minutes has as much technical merit (says you) as the "paper", that is not good. > "Which example?" Your using an example 0.1 + 0.2 != 0.3. This is nothing to do with floating point. This is an issue of choice of fraction base and an issue of precision that could affect any non-analog computation. > Don't be ridiculous You understand exactly what I mean. You replaced "Computer Scientist" with "Programmer". Borderline infringement, borderline plagiarism. > But it is not a good introduction So did you give one? No. You summarized a very famous paper and tweaked it's title. You provide no real advise for what to do. You provide no practical examples of real world code for "those programmers" that just want to know what to do. > Maybe. But it is not a good introduction... Why is it not good? I like that it puts the simple parts first and the formal math later, so you don't get bogged down in it. You're as welcome to your opinion as I am mine. > I absolutely do not "deride" the Goldberg paper. Yes you did. Let's say I said "Your website is oversimplified and difficult to navigate. It is garbage." Did I deride yours? [yes. yes i did.] > I am beginning to think you have serious problems with reading comprehension: I have serious problems comprehending a disorganized web page with a web 1.0 navigation panel instead of a properly formatted paper. > You have still not been able... See above: - Your example is borderline wrong. It's about a different subject. - "Programmers" is not a good title when your audience is "Computer Scientists" and "Software Engineers". - You changed the title in the HN post to obfuscate that you ripped off the original title. - There is zero creative, or new information presented. - The most valuable part is the "References" page. In which every single link contains more relevant and accessible information than your "site". - You aren't even linking to a definitive reference. But instead to an appendix of a user manual Instead of, for example: http://perso.ens-lyon.fr/jean-michel.muller/goldberg.pdf http://perso.ens-lyon.fr/jean-michel.muller/goldberg.pdf I think it'd be great stuff if: - you wrote a little blog - that introduced the goldberg paper gently - that augmented and highlighted the references. If they are a little complicated, then explain them. Don't imply "too complicated, you should skip". - that was able to be printed in a coherent format. Not 8 or 10 different individual web 1.0 frames. There's a reason academic papers are formatted the way they are. It's actually for precise communication. If you try to "simplify" and make things too much more "accessible" for regular "programmers", you may falsely believe you are helping. But this is a bad idea. Complex subjects do require some amount of concentration and work to understand. Floating point subtleties are not the lack of a zippy "programmer"-friendly website/blog away from that. You've tried to dumb-down a very introductory paper. It's amateurish and doesn't help. I appreciate the references. Wouldn't it have just been easier to add them to the Wikipedia article?