• Re: 128-bit binary floating point

    From Johann 'Myrkraverk' Oskarsson@3:633/10 to All on Wednesday, July 29, 2026 17:38:31
    On 29/07/2026 4:10 PM, BGB wrote:
    On 7/28/2026 5:58 PM, Lawrence D?Oliveiro wrote:
    On Tue, 28 Jul 2026 19:40:28 GMT, MitchAlsup wrote:

    At present, we have competing interest of 8-bit FP and 128-bit FP
    giving 5-sizes of FP containers.

    How many believe that 256-bit FP will be desired/useful in the
    coming decade (or farther out) ??

    I was thinking of date/time formats. POSIX already seems to be moving
    to offering the option of nanosecond granularity; an unsigned 64-bit
    integer could measure a duration of (by my calculation) up to about
    584 years with such a unit.

    I thought Posix was moving towards separate measurements of seconds, and sub-seconds. Isn't that how the more recent C APIs are defined?

    Granted, I've only ever read Posix in terms of implementing anything in
    the context of shell scripts, and such tools. Most notably /sed/ in
    Illumos, then FreeBSD. For the ignoramuses, it's the same source code.

    Well, and nanosleep(). I am working on a nanosleep() in a non-Posix environment.



    My vote personally would be 64-bit microseconds:
    ÿ Microseconds are more general / less overkill than nanoseconds;
    ÿ Epoch will likely be long enough to cover all of human civilization;
    ÿÿÿ More so if the epoch is set in the future.

    Well, there is possible debate here:
    Humanity as we know it would probably be extinct by them, but some descendants of humanity could well still exist.

    Hard to predict the long term future of humanity:
    ÿ Will remain similar ? ;
    ÿ Or, re-engineer themselves into something unrecognizable;
    ÿ Or, merge with machinery and synthetic biology;
    ÿ Or, be replaced by machinery;
    ÿ ...

    We can't really use past history to predict the future here, as humanity
    now has access to tools that no life on Earth has had, and it is absurd
    to think no one, no where will use them. And, if even only a rare few
    here and there start doing germline edits, the long term trajectory
    becomes a wildcard.

    Have you come across UnchartedX on YouTube? He has very interesting
    theories about the high tech needed to build the great pyramid, and
    other ancient ruins in Egypt. I believe he does have a point. We
    are absolutely ignorant of what kind of technology our ancestors were
    capable of.




    Like, a modern human going to the far future, and see what looks almost
    like humans, maybe a little different, or a little strange (their skin
    and eyes seeming a bit off, etc), doing things that maybe seem incomprehensible.

    Human technology, and knowledge goes up and down in waves. What is most
    likely going to happen, is that the time traveler will experience what
    so many dystopian movies cover; namely that humanity has forgotten most
    of what we consider basic quality of life technology.

    And now I'm writing like a 19th century author. Dan Cross from comp.
    lang.c is forbinned to reply, because he thinks I'm an LLM, and I think
    he's a fictional character. Specifically, the son of Alex Cross, the
    fictional detective.


    One might realize that there are no farm animals, not because everyone became vegan or something, but because their role had been replaced by
    ever growing sausage logs. They might question why anyone would choose
    to kill an animal for food rather than cut a piece off the desired
    flavor of meat log or something. Well, or giant tentacled meat slugs
    that regularly shed flavored meaty tentacles or something (and consume
    an endless supply of hay bales or something).

    Well, and modern person sees it, and wonders why anyone would replace
    farm animals with eldritch monstrosities.

    Maybe they still reproduce as before, maybe they decided it would have
    been better if new children emerge from eggs or something (since with
    eggs one can greatly externalize the cost of the reproductive process).

    The person goes by the nursery, seeing the recent larva-like hatchlings crawling around and gorging themselves on slime. And wonders just what
    they are looking at, and how humanity could have gone in such a direction.


    Well, and/or everything comes under the control of centralized
    authorities, then it is just doomed.


    But will that be enough? I can imagine scientific uses which might
    require a timescale that goes all the way to the Big Bang (13.7
    billion years ago). Using the smallest possible time unit, the Planck
    interval of about 10 ** -43 seconds, you would need an integer (or a
    mantissa) of about 201 bits.

    In other words, 256 bits ought to be plenty for that particular
    application of time measurement.

    You could make a clock that measures from the origin to the heat death
    of the universe.

    Do you need it?...

    Maybe. It really does depend on the definition of /universe/, and how
    long you expect to live. Do you plan to live long enough to experience
    the heat death of this one, and then go on and live in the next one?

    Do you need to keep the time for that interval? I wouldn't.


    You could also use 256-bit floats for the time, they are sufficiently overkill for this...


    Just how much usable range does one have by representing the time as a Binary128 value in seconds from Jan 1st 1970?...

    Or, Binary64?...

    At 2038, could still have microsecond precision with a 'double'; but go
    a few centuries and you no longer have microseconds.

    With Binary128, could put the epoch at the big bang and still have picosecond accuracy in the present.

    ...



    Holub, in his C compiler book, has an interesting comment about 2038.
    I'm not going to dig up the exact quote right now, but it's really
    interesting that people were aware of this problem in the late 80s,
    when I presume he wrote the book, because it's published in 1990.

    And that people today are not really aware of this problem. There
    are for instance many databases storing Unix time is seconds in
    32bit integer columns.

    They are going to have a /field day/ for the database administrators
    when they realize they need to ALTER TABLE all of their past data.

    Pun intended!


    Have a nice comp.arch day!

    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)