It’s been a long while since I last dealt with the float specification (IEE 754), but what I recall is this:
Floating points allow better precision along a wide range of numbers with a smaller data type compared to fixed point data in most cases. Fixed point can often be emulated by integers. Its far from perfect, but for scientific computing it’s often good enough.
If you use integers to emulate floats, there will be less precision in either the integer part, or the decimal part. You have to make a tradeoff. If you know about what types of data you will be collecting, you can get better precision compared to floating point.
Integer arithmetic can be implemented with simple logic gate layouts, and in most processors, addition/subtraction/multiplication takes very few cycles, and is generally done with a single assembly instruction. IIRC, you can, for the most part, use standard add/subtract with fixed point numbers. Floating point operations, on the other hand, are much more complex due to the nature of floating point numbers potentially having the decimal in different places. In order to break that down into standard integer based assembly code, you must do many more steps. In order to make things faster, you can create dedicated processors with more complex logic gate layouts designed around floats (FPUs) for significantly faster floating point operations.
It’s been a long while since I last dealt with the float specification (IEE 754), but what I recall is this:
Floating points allow better precision along a wide range of numbers with a smaller data type compared to fixed point data in most cases. Fixed point can often be emulated by integers. Its far from perfect, but for scientific computing it’s often good enough.
If you use integers to emulate floats, there will be less precision in either the integer part, or the decimal part. You have to make a tradeoff. If you know about what types of data you will be collecting, you can get better precision compared to floating point.
Integer arithmetic can be implemented with simple logic gate layouts, and in most processors, addition/subtraction/multiplication takes very few cycles, and is generally done with a single assembly instruction. IIRC, you can, for the most part, use standard add/subtract with fixed point numbers. Floating point operations, on the other hand, are much more complex due to the nature of floating point numbers potentially having the decimal in different places. In order to break that down into standard integer based assembly code, you must do many more steps. In order to make things faster, you can create dedicated processors with more complex logic gate layouts designed around floats (FPUs) for significantly faster floating point operations.