(I assume that this is how "fixed point" algebra works, although what I assume computers do with floats and what they actually do ain't exactly ever been similar.)
(I assume that this is how "fixed point" algebra works, although what I assume computers do with floats and what they actually do ain't exactly ever been similar.)
You might enjoy reading about IEEE-754, then: https://en.wikipedia.org/wiki/IEEE_754-1985
Assuming that the order of magnitude is fixed, this is of course doable, but according to my experience the order of magnitude does not converge.
As far as doing mathematical operations on the values, if you're using double precision floats, you have 15 digits of precision before you run into problems. In most situations, you're going to be dealing with values considerably less than 10 trillion dollars, so that will be totally sufficient. That's good news if you're using a language like JavaScript or Lua, where there is no built in integer type.
The solution is, of course, to use rational numbers ( http://gmplib.org/ ) if you have time to debug why GMP doesn't compile on your processor.