This is a typical problem of small systems which do not have native floating point support / coprocessors.

Perhaps you should consider using 24/32 bit integers for this function. You will have to write your own functions for this or search for an app note which does this. Alternately, you may look at the microchip website for the floating point code and port it to your application though I can say it will be a lot of code and slow at that.

To do the long integer math, you can multiply each number by 1000 and then compute the result. When you get the result, divide it by 1000 to get the integer part and keep the modulus of 1000 as the fractional part to display

Jerson