• xthexder@l.sw0.com
    link
    fedilink
    arrow-up
    13
    ·
    21 hours ago

    Trigonometry functions are still just a hardware lookup table in most scenarios I believe. One example I’ve noticed is that you’ll get slightly different sin/cos results on AMD vs Nvidia GPUs due to either different lookup table values, or different interpolation functions being applied on top (I’m not sure it’s possible to know for sure exactly which without internal knowledge)

    • gens@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      18 hours ago

      For cpu sine is in code. X87 has a FSIN, but nobody uses it. Afaik it’s just worse. Idk about gpus or if there’s a standard like there is for floats in general (ieee754).