Hello experts. I have read many threads about how much faster it is to use integer rather than floats for dynamic calculations on Arduino. However I could not find any practical example that would help solve my specific case.

I am building a robot and using polynomial approximations for reverse kinematics. But with floats, it gets very slow to process on my Arduino Mega. So I would like a methodology to switch to integers calculations.

For example, I am using a third degree polynom (one of many) :

x = k0 + k1 * z + k2 * z^{2} + k3 * z^{3}

my z vary from 0 to 250, and I would like my x to have at least 4 significant digits e.g. 61.26

my coefficients are constants and something like k0=64.8589, k1=-6.2598e-01, k2=2.60208e-03, k3=-1.00266e-05

How would you perform this kind of calculation using integers ?