PDA

View Full Version : math problems (again)



lab310
- 25th November 2005, 13:50
I need some way to calculate x^y (power function) where x is a word variable (0-65535) and y is selection of ( 0.5 , 0.6 , ..., 0.9, 1). Is there a some eficient way to do this,meaning not calculating series or some large tables . Integer result with some marginal error would be fine.

Paul
- 28th November 2005, 22:43
Lookup tables or a series solution maybe the easiest way of calculating it.
You could try an assembler version. Look at this page:
http://www.piclist.com/techref/microchip/math/index.htm
Scroll down to the PICList post "x^y routine implementation" section

Let us know how you get on.

Paul.