Hacker News new | ask | show | jobs
by Dylan16807 2491 days ago
Storing integers as decimal (which computers can do easily) isn't lossy either.
3 comments

I believe that's where "natively" comes in. If you store it in binary, you can operate on the values as numbers. If you do some decimal conversion, it's a blob of data. (Yes, there are BCD instructions but they're massively limited)
Decimal numbers are still "stored as binary" at the silicon level.
Unless you're on an IBM 1401... :D
z14 and Power 9 appear to support decimal integer and float. Does Python on those processors support their use?
I meant as opposed to floats, precision loss, etc.