I tried atan2 in C with argument of about 10-14. It gives a wrong answer: around 90 instead of zero, e.g.:
atan2
void main() { double a =3.4e-14; double b=9e-10; atan2(3.4e14,9.0e-9); // returns ~90 instead of zero or Not a number }
It looks like you are calling atan2 on 3.4*10^14, not 3.14*10^(-14)?
You've defined two variables a and b in your code, but then you are using constants as arguments to atan2.
a
b
The values of a and b are just ignored.
atan2(a, b);
would return a value near zero, as you would expect.
Same for atan2(3.4e-14,9.0e-9) (note e-14, not e14).
atan2(3.4e-14,9.0e-9)
e-14
e14
It looks like you are calling atan2 on 3.4*10^14, not 3.14*10^(-14)?