On 29/10/2026 10:08 pm, marcel hendrix wrote:
> On 10/29/2026 10:01 AM, dxf wrote:
>> As previously mentioned it makes no sense that one can output more significant digits >> than one can input - in anyone's universe.
> > No doubt about that. >
>> Whatever GCC is printing - it's not what >> the user entered.
> > I do that sometimes when I don't know what the hardware/software details of the machine/language are, but do know what I want it to approximate as best as possible, if not exactly. > > That does not mean that I wouldn't be surprised if .90000000000000007e e. comes back as 9.0000000000000007000e-1 but .90000000000000000076e e. shows 9.0000000000000000098e-1. ( Unless I now the hardware and software details of the machine. ) > > However, shouldn't we then also do something about > 1000000000000000000 7 / . 142857142857142857  vs > 1000000000000000000000 7 / . 553688574240601819 ?
I doubt programmers are surprised by arithmetic overflow. Occasionally I've run into entered literals being too large and not noticing. Whether the compiler detects it appears to depend upon on the language and its conventions. When I looked, C compilers (like Forth) didn't but Pascal did.