OpenCL offers several math constants at different floating-point precisions: double, single and half. CUDA does not really offer any of them; and if you use the C math library, you get double-precision constants.
So, let's make the constants available in CUDA as well.
Note, however, that OpenCL's M_PI and glibc's M_PI don't have the same textual value, while having the same double value. See this thread for details.