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.pamphlet10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/algebra/sf.spad.pamphlet b/src/algebra/sf.spad.pamphlet
index 745dc254..b78d9bdb 100644
--- a/src/algebra/sf.spad.pamphlet
+++ b/src/algebra/sf.spad.pamphlet
@@ -475,10 +475,12 @@ DoubleFloat(): Join(FloatingPointSystem, DifferentialRing, OpenMath,
manexp(x) ==
zero? x => [0,0]
- s := sign x; x := abs x
- if x > max()$% then return [s*mantissa(max())+1,exponent max()]
- me:Record(man:%,exp:Integer) := MANEXP(x)$Lisp
- two53:= base()**precision()
+ s := sign x
+ x := abs x
+ if x > max()$% then
+ return [s*mantissa(max())+1,exponent max()]
+ me: Record(man:%,exp:Integer) := MANEXP(x)$Lisp
+ two53 := base()**precision()
[s*wholePart(two53 * me.man ),me.exp-precision()]
-- rationalApproximation(y,d,b) ==