I have no idea why it was implemented using "order".
diff --git a/src/algebra/float.spad b/src/algebra/float.spad
index f7fd58fb..fbbbda16 100644
--- a/src/algebra/float.spad
+++ b/src/algebra/float.spad
@@ -83,9 +83,9 @@
arbitraryPrecision, arbitraryExponent) with
normalize : % -> %
++ normalize(x) normalizes x at current precision.
- relerror : (%, %) -> I
- ++ relerror(x, y) computes the absolute value of \spad{x - y} divided by
- ++ y, when \spad{y \~= 0}.
+ relerror : (%, %) -> %
+ ++ relerror(x, y) computes the absolute value of \spad{(x - y)/y},
+ ++ when \spad{y \~= 0}.
shift : (%, I) -> %
++ shift(x, n) adds n to the exponent of float x.
rationalApproximation : (%, N) -> RN
@@ -550,7 +550,7 @@
digits(n) == (t := digits(); bits (1 + ceillog10base2 n); t)
order(a) == LENGTH a.mantissa + a.exponent - 1
- relerror(a, b) == order((a-b)/b)
+ relerror(a, b) == abs((a-b)/b)
0 == [0, 0]
1 == [1, 0]
base() == BASE
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.