• Gork@lemm.ee
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    1 year ago

    t_furure_min = t_now + 5.391247 × 10^-44 seconds

    • corroded@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      long double future_time = static_cast(time(nullptr)) + (5.391247L * pow(10.0L, -44.0L))

      Fixed-precision arithmetic would probably be more appropriate here, but since I’m lazy, long double works. Although I am curious now if a long double has sufficient precision to give a meaningful value for this.

      • Dr. Bluefall@toast.ooo
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I feel like at some point, you’d need arbitrary precision and arbitrarily-sized real numbers in order to meaningfully represent it.