[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Procps in core-updates
From: |
Michael Schierl |
Subject: |
Re: Procps in core-updates |
Date: |
Mon, 20 Mar 2023 21:02:01 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 |
Hello Andreas,
Am 20.03.2023 um 15:54 schrieb Andreas Enge:
Hello Michael,
I am attaching a simplified C file and the corresponding assembly
output; which I cannot read, but there are differences between the two
invocations of fprintf.
Seems that you accidentally attached the object file (binary) instead of
the assembly output. :-)
The weirdest thing is that actually the value is the integer 123. So it
should be stored in any kind of register exactly.
123 as a normalized binary floating point number would be
1.921875 × 2⁶
and you would have to represent the mantissa in binary (1.111011₂).
Still this should fit into most floating point registers easily.
But possibly the value computed by the algorithm of parsing the number
resulted in e.g.
1.111011000000000000000000000000000000000000000000000001011₂ × 2⁶
which is still 123 when converted back to a 52-bit mantissa, but
something ever so slightly larger when treated as an 80-bit float with
64 bits mantissa.
Or maybe I'm missing something :-)
Regards,
Michael