Two topics in one day!, tonight I will sleep like a baby

I quite like maths, I do a lot of modelling with differential equations and such like

I also use Matlab quite a lot, I use it to model systems with complex equations (pardon the pun!) and the basic fitting is very useful to reduce complicated systems to something much more simple

Look at the attached pic

I have fitted a curve as a 5th degree polynomial which is more than I need but its a good demonstration, it uses the ADC reading on the x axis to correspond to an output on the y axis

So I can use the ADC reading directly to see what a value maybe, all good so far

My question is how to best deal with equations like this and how I should program them, I need to be aware of overflow errors and at this minute I just don't know how to best program this sort of stuff

here is a separate equation from a different process

data=Read_ADC(Channel); volatile double value=((-6.732*(float)data*(float)data*(float)data)/10000000.0) +0.0.0006775*((float)data*(float)data) -0.367813*((float)data) +134.01;

So I read an ADC value the max value is 1023, hence I have to be careful about overflow as 1023^3.2 is almost 2^32

So I am interested to see how to code the equation in the screen shot, how to raise a number to a power and divide by large numbers like 10^9 etc

how I should deal with this stuff

-1.203(ADC^5)/10^12 +3.279(ADC^4)/10^9 -3.598(ADC^3)/10^6+0.002009(ADC^2)-0.6809*(ADC) +146.8

One day i will get around to avoiding floating points but for my work I am doubtful I can even do it

I just don't see how I can calculate sin/cos etc without float but thats a discussion for another day