Reminds me of the old way of doing *10
- T1 = INPUT << 2
- T2 = INPUT << 1
- Result = T1 + T1 + T2
If you look in the OVMS v2 code (on that little 8bit PIC microcontroller), you’ll see lots of little kludges like this. Some for performance, and some to keep the calculation similar to other tiny MCUs in the car.
Regards, Mark.