--- a/Number.st Mon May 09 16:52:17 2016 +0200
+++ b/Number.st Mon May 09 16:53:50 2016 +0200
@@ -1325,10 +1325,13 @@
cbrt
"return the cubic root of the receiver"
+ "/ if I am not a Float (or a less general lpReal),
+ "/ retry after converting to float
(self isLimitedPrecisionReal not
or:[self generality < 1.0 generality]) ifTrue:[
^ self asFloat cbrt.
].
+ "/ very slow fallback
^ self cbrt_withAccuracy:self epsilon
!
@@ -1343,10 +1346,13 @@
exp
"compute e**x of the receiver"
+ "/ if I am not a Float (or a less general lpReal),
+ "/ retry after converting to float
(self isLimitedPrecisionReal not
or:[self generality < 1.0 generality]) ifTrue:[
^ self asFloat exp.
].
+ "/ very slow fallback
^ self exp_withAccuracy:self epsilon
!
@@ -1368,10 +1374,13 @@
"return the natural logarithm of myself.
Raises an exception, if the receiver is less or equal to zero."
+ "/ if I am not a Float (or a less general lpReal),
+ "/ retry after converting to float
(self isLimitedPrecisionReal not
or:[self generality < 1.0 generality]) ifTrue:[
^ self asLongFloat ln.
].
+ "/ very slow fallback
^ self ln_withAccuracy:self epsilon
"
@@ -1450,10 +1459,13 @@
sqrt
"return the square root of the receiver"
+ "/ if I am not a Float (or a less general lpReal),
+ "/ retry after converting to float
(self isLimitedPrecisionReal not
or:[self generality < 1.0 generality]) ifTrue:[
^ self asFloat sqrt.
].
+ "/ very slow fallback
^ self sqrt_withAccuracy:self epsilon
!