Which is all fine and everything, until it starts spitting out decimal representations of integer values that aren't the actual integer value represented by a given float.
Yes, I linked to that algorithm before in other threads. That algorithm is the problem, and it's stupid and nonsensical. The threshold to break out into e-notation (step 9) should be earlier, instead of padding with trailing zeroes (step 6). No other language does this.
-
-
This would all be much easier if people accepted the fact that the only reason it hasn't been changed is because of backwards compatibility, instead of arguing endlessly for the status quo. Some things are just stupid. Yes, we're stuck with them. That doesn't make them not stupid
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This Tweet is unavailable.
-
But Python doesn't do either of those when converting to a string, it uses 1.000000000000001e+18. That's *both* natural *and* makes the loss of precision clear. A number without a decimal point is *not* obviously not actually a precise integer to non-tech people.
- Show replies
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.