I have included in my code the math.h and also used -lm but when i use the gcc debugger when it comes to atan2() i get the following:
16 result = atan2(x,y) * val;
(gdb)
__atan2 (y=15, x=32) at w_atan2.c:31
31 w_atan2.c: No such file or directory.
(gdb)
34 in w_atan2.c
(gdb)
__ieee754_atan2_sse2 (y=15, x=32) at ../sysdeps/ieee754/dbl-64/e_atan2.c:92
my code is
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define PI 3.14159265
main(){
double x, y, val, result;
val = 180 / PI;
x = 15;
y = 32;
result = atan2(x,y) * val;
printf("%lf\n",result);
}