[Solved] C++ mathematical problem and 5/4*pi vs 5*pi/4 [closed]
This is because both the following operations are different : 5 * M_PI / 4 and 5 / 4 * M_PI The operations are performed left to right. On the first line, 5 * M_PI (int * float) returns a float (15.7…) which is divided by an int (float / int) returning a float (3.9…). … Read more