pow precision

Hello,

I noticed that pow(t, 3.3333334e-1f) in OpenCL and std::pow(t, 3.3333334e-1f) do not always yield the same result, even if I use the CPU as the OpenCL device.

I understand the OpenCL is very strict in precision issues so I suspect that the problem is with the std version.
Is there a CPU equivalent for OpenCL pow that will always yield the same result?

(t is a float and is always > 0.00856451679f)

Thanks in advance,
Yoav

try using powr(x,y) function on the gpu…

It turns out that the problem was in a previous function, where one of the compilers make some optimization for float constants and the other don’t.