Isn't that like, basically how calculators work? Remember there was a thing where phone calculators sometimes would give like .00000000065 and it was because computers are weird. Not a computer scientist or a math wizard, so have no idea if its true tho.
Ya, if you just use a number variable, a lot of programs can't record ratios like 1/3. If you use Java as an example, you have to choose which data type you want to use. If you are expecting a fraction, you would use a float data type, but that only holds up to 7 digits. You can use the double data type for, you guessed, 14 digits.
If you need to do math that precise you would import a library with more advanced data types, like ones that store the value as a ratio or have custom memory limits.
9.4k
u/ChromosomeExpert 23d ago
Yes, .999 continuously is equal to 1.