--- a/LPReal.st Fri May 08 12:29:18 1998 +0200
+++ b/LPReal.st Fri May 08 14:02:08 1998 +0200
@@ -241,8 +241,15 @@
].
+ "/ NOTICE: this must be redefined in float
+ "/ subclasses to handle the smallinteger range;
+ "/ i.e. this may only be invoked for reals
+ "/ which are NOT within the smallInt range.
+ "/ otherwise, endless recursion is the consequence.
+
max := SmallInteger maxVal // 2 + 1.
maxF := max asFloat.
+
^ (self quo:maxF) * max + (self rem:maxF) truncated
"
@@ -496,5 +503,5 @@
!LimitedPrecisionReal class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/LPReal.st,v 1.27 1998-04-22 19:12:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/LPReal.st,v 1.28 1998-05-08 12:02:08 cg Exp $'
! !
--- a/LimitedPrecisionReal.st Fri May 08 12:29:18 1998 +0200
+++ b/LimitedPrecisionReal.st Fri May 08 14:02:08 1998 +0200
@@ -241,8 +241,15 @@
].
+ "/ NOTICE: this must be redefined in float
+ "/ subclasses to handle the smallinteger range;
+ "/ i.e. this may only be invoked for reals
+ "/ which are NOT within the smallInt range.
+ "/ otherwise, endless recursion is the consequence.
+
max := SmallInteger maxVal // 2 + 1.
maxF := max asFloat.
+
^ (self quo:maxF) * max + (self rem:maxF) truncated
"
@@ -496,5 +503,5 @@
!LimitedPrecisionReal class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.27 1998-04-22 19:12:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.28 1998-05-08 12:02:08 cg Exp $'
! !