The article goes into depth about what you should be using. Floats and doubles are not designed for use with base 10 fractions. They’re good at estimating them, but not accurate enough for real financial use.
There’s also not much reason to reinvent the wheel for an already solved problem. Many languages have this data type already built into the language, and the rest usually have it available through a package.
The article goes into depth about what you should be using. Floats and doubles are not designed for use with base 10 fractions. They’re good at estimating them, but not accurate enough for real financial use.
There’s also not much reason to reinvent the wheel for an already solved problem. Many languages have this data type already built into the language, and the rest usually have it available through a package.
Oh nice I’m far from a professional programmer. Thxs for the explanation.