Hello all, I was going through the cl_platform.h header(s) on my system, and I was surprised to find that the definition of PI (CL_M_PI and CL_M_PI_F) were apparently in disagreement:
Code :#define CL_M_PI 3.141592653589793115998 #define CL_M_PI_F 3.14159274101257f
Moreover, these values are different from the ones that are found e.g. in the GNU C standard library headers, where for example we have
Code :# define M_PI 3.14159265358979323846
It is my understanding (and the findings e.g. here seem to agree) that at the precision of double and floats the definitions are essentially equivalent. However, I believe it is a little confusing to see those values, especially when someone is familiar with the ones typically used instead.
So my questions are:
1) why the choice?
2) would it be possible to amend the header files with either the 'correct' values or a comment on why they are not used?