Reminds me of the time I was writing ESP/ESC software for car ECUs back in the days before Simulink models and automatic code generation where we had the vehicle dynamics books with all the physics of the car, and had to convert the math functions from continuous to discrete, then implement them in fixed point C, along with trigonometric functions (the CPU had no HW SIN/COS), optimized enough to run 100 times/second on a 16bit chip while keeping CPU load under 85%.
Test drivers were in awe and thought it's voodoo. No, it's just basic math implemented in C, similar to what Carmack was doing for the Doom/Quake 3D engines ;)