2 ms·
> it is easy to fake it by using integers and then placing the decimal point That's not "faking it", that using fixed point numbers [1]. They are a great alter
by wongarsu 8y ago
> it is easy to fake it by using integers and then placing the decimal point
That's not "faking it", that using fixed point numbers [1]. They are a great alternative if the numbers stay in roughly the same magnitude, and are much saner when dealing with e.g. money.
1: https://en.wikipedia.org/wiki/Fixed-point_arithmetic https://en.wikipedia.org/wiki/Fixed-point_arithmetic
- herodotus 8y agoGood point, and thanks. But if you are doing a real-time display (like an industrial controller, for example), you may not be able to choose a fixed point number as your source. I chose the music time example first because it is a common use of a number that needs to change in (almost) real time.