aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/sf.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/sf.spad.pamphlet')
-rw-r--r--src/algebra/sf.spad.pamphlet5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/algebra/sf.spad.pamphlet b/src/algebra/sf.spad.pamphlet
index d4291701..55a4bd72 100644
--- a/src/algebra/sf.spad.pamphlet
+++ b/src/algebra/sf.spad.pamphlet
@@ -278,12 +278,13 @@ DoubleFloat(): Join(FloatingPointSystem, DifferentialRing, OpenMath,
++ (that is, \spad{|(r-f)/f| < b**(-n)}).
== add
- MER ==> Record(MANTISSA:Integer,EXPONENT:Integer)
+ macro MER == Record(MANTISSA:Integer,EXPONENT:Integer)
import %hash: % -> SingleInteger from Foreign Builtin
import %fminval: () -> % from Foreign Builtin
import %fmaxval: () -> % from Foreign Builtin
import %fbase: () -> PositiveInteger from Foreign Builtin
import %fprec: () -> PositiveInteger from Foreign Builtin
+ import %fmanexp: % -> Record(man: %,exp: Integer) from Foreign Builtin
import %i2f: Integer -> % from Foreign Builtin
import %fabs: % -> % from Foreign Builtin
import %fneg: % -> % from Foreign Builtin
@@ -491,7 +492,7 @@ DoubleFloat(): Join(FloatingPointSystem, DifferentialRing, OpenMath,
x := abs x
if x > max()$% then
return [s*mantissa(max())+1,exponent max()]
- me: Record(man:%,exp:Integer) := MANEXP(x)$Lisp
+ me: Record(man: %,exp: Integer) := %fmanexp x
two53 := base()**precision()
[s*wholePart(two53 * me.man ),me.exp-precision()]