Hacker News new | ask | show | jobs
by OJFord 484 days ago
Or just '123' & '45'?
2 comments

I think it is to optimize arithmetic operations. Significantly less steps with the first method, which only requires adjustment of how many digits are considered to be decimal rather than the rejoin, arithmetic, separate again for your proposal. Plus, wider float.
But then you can't tell the difference between 0.12 and 0.00012.

Unless you're suggesting to use the strings "0" and "00012", at which point you could just use a byte string with the utf8 encoding of the value.