by GuB-42 · 7y ago · 0 comments
I have written a test framework and I am quite familiar with these problems, and comparing floating point numbers is a PITA. I had users complaining that 0.3 is not 0.3.
The code managing these comparisons turned out to be more complex than expected. The idea is that values are represented as ranges, so, for example, the IEEE-754 "0.3" is represented as ]0.299~, 0.300~[ which makes it equal to a true 0.3, because 0.3 is within that range.
Maybe the creator's theory is that people will search for 0.30000000000000004 when they run into it after running their code.
FWIW - the only way I can ever find my own website is by searching for it in my github repositories. So I definitely agree, it's not a terribly memorable domain.
And, at the end of the day, even if there's a filter bubble and it's the reason I see it first, then so what? The people looking for this site are likely going to fit into the same set of targeted demographics as you and me and most people on this site. So unless you also want to cater to 65-year old retirees that don't care about computer science and what floating numbers are, then why does the filter bubble even matter?
It would be if you both used DuckDuckGo, though :)
That's why we need regular expressions support in every search box, browser history, bookmarks and Google included.
"simple" discussion: https://floating-point-gui.de/errors/comparison/
more advanced: https://randomascii.wordpress.com/2012/02/25/comparing-float...