[Oberon] Fighting a dragon ...

Michael Schierl schierlm at gmx.de
Mon Jul 15 23:29:50 CEST 2024


Hello Hans,
Hello Jörg,

Am 15.07.2024 um 22:40 schrieb Hans Klaver:
> Hi Jörg,
>
> Thanks for this multiplication test.
>
> The outcomes are quite remarkable:
>
> PdW's emulator without patch indeed gives one wrong* and two correct answers:
>     1.9999998
>     1.0000001*
>     2.0000002
>
> But Michael's patched emulator gives three wrong* answers (all around 1 instead of 2):
>      .9999999*
>     1.0000000*
>     1.0000001*

I get three wrong results, regardless whether I use my emulator before
or after the patch. Also a very old version of my emulator from 2019
returns three wrong results. Do you still have the source of the
emulator that returned two correct results?


In fact, even when doing

Out.RealFix( FLT(2), 12, 7); Out.Ln;
Out.RealFix( FLT(7), 12, 7); Out.Ln;

I get
    1.0000000
     .8750000

Using Out.Mod by Andreas (which directly calls into Texts.WriteRealFix),
so probably that is not the culprit.

Out.Real works better (in the sense that with my patch, all the values
look correct).


Regardless, running the same disk image in my emulator that uses
"Native" floating point (on x86_64 on Windows), all expressions work, so
I would blame neither the compiler nor Texts.Mod.


Maybe I can find time sometimes to dig into this further - at the moment
I am too tired to do so.



Regards,


Michael



More information about the Oberon mailing list