pow() bug?

John MacCallum johnmac at berkeley.edu
Sat May 17 16:37:11 UTC 2008


Hi all,

I'm having some trouble with the pow() function.  The code below gives  
me answers of 0.000000 when compiled for an arm machine.  Any help  
would be greatly appreciated.

#include "math.h"
#include "stdio.h"

int main(){
   printf("pow: %f\n", pow(3.14159, 0.618034));
   printf("exp: %f\n", exp(0.618034));
   return 0;
}

********************************************

$ arm-linux-gcc -O3 -Wall -lm -o powtest powtest.c

On the arm machine:

# ./powtest
pow: 0.000000
exp: 0.000000

Thanks in advance!
JM



More information about the uClibc mailing list