• bort@sopuli.xyz
    link
    fedilink
    arrow-up
    14
    ·
    9 days ago

    This abuses errors in the fixed-point math, to have the first “error” line up exactly where we want, on that final leap second.A round-down multiplier is used, with a pre-increment, as that is the type of adjustment that yields an eventual long-minute and long-hour.

    i love it

  • pHr34kY@lemmy.world
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    9 days ago

    If everyone coded like this, we wouldn’t have so many data centres spewing soot into the sky.

    • Test_Tickles@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      9 days ago

      I would say that 90% of devels would look at this and have no clue what is going on or why.
      This is something to be done in the compiler, but not in the code unless there’s some actual slow down in the code that is visible via benchmarking.

    • Deebster@infosec.pub
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 days ago

      I understand it with the given explanation, but I would be utterly mystified if I came across this code in the wild.