• Num10ck@lemmy.world
    link
    fedilink
    English
    arrow-up
    23
    ·
    9 months ago

    OG Doom engine uses pre-built lookup tables for fixed point trigonometry. (table captures the full 360 degrees for sine and cosine with 10240 elements)

    • DdCno1@kbin.social
      link
      fedilink
      arrow-up
      12
      ·
      9 months ago

      Tons of software did this for the longest time. Lookup tables have been a staple of home computing for as long as home computers have existed.

      • barsoap@lemm.ee
        link
        fedilink
        English
        arrow-up
        4
        ·
        9 months ago

        And CPUs still do it to this day. Nasty, nasty maths involved in figuring out an optimal combination between lookup table size and refinement calculations because that output can’t be approximate, it has to work how IEEE floats are supposed to work. Pure numerology.