On Thu, 9 Jan 2003 jmartin@COMP.UFSCAR.BR wrote: > Scott, i4m trying to do an altimeter based on pressure altitude. > > So, the eq is: > > H = 44330,769[1 - (P/P1)^0,190255] > Where H is the altitude, P is the air pressure at altitude H at > a given and variable sea level pressure P1. That doesn't answer the question. Again, what are dynamic ranges of P and P1? Do these come from an 8-bit A/D converter or what? You originally asked for 32-bit precision, but I doubt you need it. It'd probably make sense in a PIC to re-write this equation like: H = A * ( 1 + P^B * (1/P1)^B) Use a lookup table to compute f(x) = x^B and then perform the simple arithmetic computation that follows. Of course, you'll need to scale the 1/P1 in a range suitable for the table. But I can't tell what the scale factors should be without first knowing the dynamic range of your variables. Scott -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.