I don't think I understood before this week that a "fixed point number" is literally just an integer (which represents that integer divided by 1000 or something)

Follow

@b0rk ... which explains the word "float" and (mostly) the even stranger term "double".

I'm told that, when storing amounts of money (e.g., in banking), you're supposed to use fixed-point numbers (integer numbers of pennies) to avoid surprising rounding errors.

@peterdrake Can confirm. In the business software we write all currency is stored as integer + the currency in a separate field, we have a list which currencies have 0, 1, 3 or 4 decimals (everything else has 2), and when displaying to users / entering from the UI we convert (multiply/divide).

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.