Im doing some C++, and I've stumbled across something thats behaving very odd. Im hoping someone could explain to me why this is happening.
I've defined PI as follows.
#define PI 4 * atan(1.0)
However, when I do the following, I get a very weird number (35.34291....)
double first = 180.0/PI;
When I hardcode pi (3.141592654) instead of PI, it gives me 57.2957
Why is this happening exactly?