I'm working on an accounting program, and would like to know how to create two decimal numbers, instead of arbitrary point decimals.
There is a package https://github.com/JuliaMath/FixedPointDecimals.jl
But you can just make all calculations in cents (i.e. multiply internally by 100 and store everything in Int)
I was using integers, but then I couldn't do negative numbers. Can I do negative numbers with FixedPointDecimals.jl ?
How come that you cannot use negative integers?
What does that mean?
I thought I couldn't but it turns out I made a mistake, and I can create negative integers, so nevermind that.
Last updated: Nov 22 2024 at 04:41 UTC