Results 1 to 3 of 3

Thread: pow precision

  1. #1

    pow precision


    I noticed that pow(t, 3.3333334e-1f) in OpenCL and std:ow(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,

  2. #2

    Re: pow precision

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

  3. #3

    Re: pow precision

    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.

Similar Threads

  1. Precision problem
    By gkaran in forum OpenCL
    Replies: 2
    Last Post: 04-08-2012, 12:47 PM
  2. high precision
    By howaidi in forum OpenCL
    Replies: 2
    Last Post: 11-21-2011, 02:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean