From c98b2eddc8251a1970ec3e8be990f1099e9e01c2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 30 May 2017 11:45:57 +0200 Subject: [PATCH] Fix EqFloat to actually work correctly --- src/macfloat.c | 1 + tst/testinstall/float.tst | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/macfloat.c b/src/macfloat.c index 15c0ec6e6f..4eaa6ca46e 100644 --- a/src/macfloat.c +++ b/src/macfloat.c @@ -94,6 +94,7 @@ Int EqMacfloat ( } Obj FuncEqMacfloat ( + Obj self, Obj macfloatL, Obj macfloatR ) { diff --git a/tst/testinstall/float.tst b/tst/testinstall/float.tst index dc2e1b10f4..86ad31cd8a 100644 --- a/tst/testinstall/float.tst +++ b/tst/testinstall/float.tst @@ -145,6 +145,18 @@ gap> -MakeFloat(1.0, infinity) = neginf; true gap> MakeFloat(1.0, -infinity) = neginf; true + +# +gap> EqFloat(1.0, 1.1); +false +gap> EqFloat(1.0, 1.0); +true +gap> EqFloat(0.0/0.0,0.0/0.0); +false +gap> EqFloat(0.0,0.0/0.0); +false + +# gap> STOP_TEST( "float.tst", 1); #############################################################################