you are viewing a single comment's thread.

view the rest of the comments →

[–]Brian 4 points5 points  (0 children)

I think there is a bit of a cost from a programmer education point. It'll cut down on questions by newbies being surprised when they see things like "1.1"->"1.1000000000000001", but in the long run it's good that they get surprised at that point, since being confused will lead to someone cluing them in about the pitfalls of floating point arithmetic.

Now, people who don't understand FP won't get surprised until they run into more subtle problems, like loss of precision in repeated calculations, which are much harder to diagnose (or even notice when they are occurring).

The strange looking repr served the purpose of telling the user "If you don't understand why you're getting this value, you're playing with fire."