high precision

Hi,

How we can get a high precision in opencl, I am doing some mathmatic computation and using pow function, but at some ponit it round the value to zero, while on CPU it give a very small value but not zero “and this is what I want”.

If they’re not adequate you probably have to code your own, source isn’t too hard to find. e.g. see cephes http://www.netlib.org/cephes/ or source to any of the free libm implementations.

I am doing some mathmatic computation and using pow function, but at some ponit it round the value to zero, while on CPU it give a very small value but not zero “and this is what I want”

OpenCL is actually pretty strict when it comes to the precision of its math operations. Is it possible that your computation is producing a denormalized float and your GPU doesn’t support them? See what you get from clGetDeviceInfo(…, CL_DEVICE_SINGLE_FP_CONFIG, …).