3 ms·
I've definitely read a ton of code like this. I often do it in simulation as well to help speed up calculations. Basically one is still doing floating point,
by esmi 9y ago
I've definitely read a ton of code like this.
I often do it in simulation as well to help speed up calculations. Basically one is still doing floating point, but manually. i.e. You changed the unit (a.k.a. exponent a.k.a. window) such that the desired value can be accurately quantized by an unsigned int (a.k.a. mantissa a.k.a offset).
The big caveat being one needs to be sure the calculation doesn't over/under flow the window, of course.