--- a/LimitedPrecisionReal.st Tue Jun 11 23:43:11 2002 +0200
+++ b/LimitedPrecisionReal.st Tue Jun 11 23:44:10 2002 +0200
@@ -78,6 +78,17 @@
!LimitedPrecisionReal class methodsFor:'constants & defaults'!
+decimalPrecision
+ "return the precision (the number of decimal digits)"
+
+ ^ (self precision / (10.0 log:self radix)) floor
+
+ "
+ Float decimalPrecision
+ ShortFloat decimalPrecision
+ "
+!
+
e
"return the closest approximation of the irrational number e"
@@ -105,7 +116,14 @@
epsilon
"return the maximum relative spacing"
- ^ self radix raisedTo:(1- self precision)
+ ^ self radix asFloat raisedTo:(1 - self precision)
+
+ "
+ ShortFloat epsilon
+ Float epsilon
+ LongFloat epsilon
+ "
+
"Created: / 7.9.2001 / 14:06:41 / cg"
!
@@ -116,7 +134,6 @@
self subclassResponsibility
"Created: / 7.9.2001 / 14:06:56 / cg"
- "Modified: / 7.9.2001 / 14:07:15 / cg"
!
fmin
@@ -125,7 +142,6 @@
self subclassResponsibility
"Created: / 7.9.2001 / 14:07:06 / cg"
- "Modified: / 7.9.2001 / 14:07:19 / cg"
!
pi
@@ -133,7 +149,6 @@
self subclassResponsibility
- "Modified: / 7.9.2001 / 14:05:02 / cg"
"Created: / 7.9.2001 / 14:07:35 / cg"
!
@@ -142,7 +157,6 @@
self subclassResponsibility
- "Modified: / 7.9.2001 / 14:05:02 / cg"
"Created: / 7.9.2001 / 14:07:58 / cg"
!
@@ -151,7 +165,6 @@
self subclassResponsibility
- "Modified: / 7.9.2001 / 14:05:02 / cg"
"Created: / 7.9.2001 / 14:08:20 / cg"
! !
@@ -665,6 +678,6 @@
!LimitedPrecisionReal class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.43 2001-11-16 13:21:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.44 2002-06-11 21:44:10 stefan Exp $'
! !
LimitedPrecisionReal initialize!