Name: Anonymous 2011-08-15 5:38
#include <stdio.h>
#include <math.h>
int main()
{
double phi = (1 + sqrt(5))/2;
int n = 12;
n = (pow(phi,(double)n) - pow((1 - phi),(double)n))/sqrt(5);
printf("%d \n", n);
}gcc --std=c99 name.c
undefined reference to 'pow'
undefined reference to 'pow'
gcc name.c
undefined reference to 'pow'
undefined reference to 'pow'
What am I doing wrong? The standard library is install and the man pages do have a description of
double pow(double, double)