Ian Bennett wrote: > I am currently using a 16c84 for a project and I need to be able to > divide an integer number by a floating point number and end up with > a floating point result to two decimal places. I.e. 457 / 4.35 = > 105.06. > > The first integer number will never exceed 16384. The second > floating point number will always be in the range .01 to 255. > > I have looked at the Math routines on the MicroChip docs CD but I > can't seem to get them to work properly. The documentation does not > make it clear (to me anyway) how I need to pass the numbers to the > routines. Ian: I wouldn't bother with floating-point numbers here... If I were you, I'd store both numbers as integers, with the divisor multiplied by 100 to move the decimal point over two places. To perform the division, I'd take the dividend and multiply it by 100, then divide it by the already-multiplied-by-100 divisor using an integer 24-bit/16-bit divide routine. The quotient will be 100 times too large, of course... If you don't want to leave it that way, you can divide it by 100 to get the real answer. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === === Custodian of the PICLIST Fund -- For more info, see: === http://www.geocities.com/SiliconValley/2499/fund.html