>>PS. Are you sure you linked against avr-libc's math library?
>>
>>It linked against the libc math libraries .
>
>
>How exactly?
>
>
I checked the map files and also passed the -lm option.

Also checked the disassembly to ensure that the correct functions are linked 
and also stepped through it.

>
>
>
>>
>>Also adding to the points mentioned above, is it required to use the 
>>logrithms for getting this done as we explicitly say the second argument of 
>>pow should be an integer ?
>
>I don't know who is "we" (Atmel? :-) ) but
>
>

http://svn.savannah.nongnu.org/viewvc/trunk/avr-libc/libm/fplib/pow.S?revision=2191&root=avr-libc&view=markup
has a comment saying nonintegral y is not leagal, looking into it more closely, 
it looks to be for handling the case of complex numbers.

Mysuggestion was handling the cases where power required is a whole number or 
an integer separately so that accuracy for them can be improved rather than 
going by the exponent method.

http://en.wikipedia.org/wiki/Exponentiation_by_squaring

This involves the recursive calls, I am unsure of the tradeoff between this 
method and using the method of exponents.

-George-
_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to