Yep, sounds like it. However, I should note, I ran the code in both Dartium and standalone dart interpreter, so it's not just Javascript broken, Dart is broken too.
– orion3Jan 23 '14 at 23:31
1
Don't let the mention of JS in the title fool you. The answers there apply unaltered to almost every other modern language, because almost other modern language uses IEEE 754 binary floating point.
– Jan 23 '14 at 23:33
Oh, I'm sorry, haven't read the question's answer. It's not broken, but the behavior is exactly like Javascript. Which, I guess, is a good thing for now.
– orion3Jan 23 '14 at 23:33
I programmed for years before I understood why floating point numbers behave this way. It is something simple but it takes a lot of information to understand what is going on.
– Jason SperskeJan 23 '14 at 23:34
1
@snitko It has nothing to do with JavaScript. It has everything to do with *relative precision floating point*. You have 64-bits for a "double". You can only represent so many *discreet* values (and yet there are infinitely many real numbers in the same range). See [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).
– user2864740Jan 23 '14 at 23:34
1
@snitko Also see [What Every Computer Scientist Should Know About Floating-Point Arithmetic](http://docs.sun.com/source/806-3568/ncg_goldberg.html), which is from a comment in the duplicate.
– user2864740Jan 23 '14 at 23:36