I've just installed a new version of Linux (kernel 3.2.0) and I
am having some strange problems with the math.h library.
When I write a program like this:
#include <math.h>
#include <stdlib.h>
void main () {
printf("%f",atan(1));
When I write that, I ALWAYS get 0.785398 for the atan of 1, whichQuote:}
is supposed to really be 45.
I've tried it about 15 different ways, using doubles and ints
and different ways of putting the value into printf, but I
always get the same value, or something equally as strange out.
I figured out that (tan(1))*(atan(1)) is very close to the value
but I don't think it has anything to do with it.
Please help me, I've included the -lm thing, and it used to work
with my old kernel 1.0.8., but I can't figure out what's going
on with it, it does a clean compile with no errors.
Henson Daytona