• Num10ck@lemmy.world
    link
    fedilink
    English
    arrow-up
    23
    ·
    7 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
      ·
      7 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
        ·
        7 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.

      • rottingleaf@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 months ago

        I really like reading people talk about how better programmers in a more civilized age could do things.

        • DdCno1@kbin.social
          link
          fedilink
          arrow-up
          5
          ·
          7 months ago

          Anyone who has ever had to maintain old code will tell you that this more civilized age is right now and that the past was a dark and terrible time.

          Seriously, there were no standards, there was barely any documentation even in large organizations and people did things all the time that would get you fired on the spot today. Sure, you had the occasional wunderkind performing amazing feats on hardware that had no business of running these things, but this was not the norm.

          • rottingleaf@lemmy.zip
            link
            fedilink
            English
            arrow-up
            5
            ·
            7 months ago

            I didn’t have to maintain it, actually I haven’t ever worked as a programmer. But I’ve patched a few FOSS things abandoned around 15-25 years before that to work as a hobby activity, some kind of digital archeology.

            I think people also do things now for which they’d be fired on the spot 20 years ago. Everything changes.

            I suspect what you call “no standards” means in fact “different standards”, but that’s just a cultural difference. Some project from 1995 may use “Hungarian notation” in variable names, well, that was normal then.

            That adequate version control and documentation are, eh, a bit more of a norm now, - yes.