[Oberon] Fighting a dragon ...
Hans Klaver
hklaver at dds.nl
Mon Jul 15 22:40:47 CEST 2024
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*
For me this last result is unexpected, because apart from the fact that the problems with the even dragon curves are gone, I also did the test that I posted on this mailing list on 8 Oct 2023 (TestRealMul.Mod) and that gave all correct results using Michael's patched emulator (and many wrong results using the unpatched emulator).
I did NOT also apply the change that you suggested in file risc-fp.c.
Will that make any difference?
Regards,
Hans
On 15 July 2024, at 15:40 Jörg Straube wrote:
> Below you find three different REAL multiplications.
> As the original Verilog files for the FPGA board had an error, PdW’s emulator had the same error as well.
> Without patch, the second multiplications will give a wrong result.
> After Michael’s patch, all three multiplications should work.
>
> MODULE Multiplication;
> IMPORT Out;
> PROCEDURE Test*;
> VAR r: REAL;
> BEGIN
> r := 1.45052123;
> Out.RealFix( r*1.3788146, 12, 7); Out.Ln;
> Out.RealFix( r*1.3788147, 12, 7); Out.Ln;
> Out.RealFix( r*1.3788148, 12, 7); Out.Ln
> END Test;
> END Multiplication.Test
More information about the Oberon
mailing list