[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Re: [bug] "FloatQ fmin log: 10" fails
From: |
Paolo Bonzini |
Subject: |
[Help-smalltalk] Re: [bug] "FloatQ fmin log: 10" fails |
Date: |
Fri, 12 Jun 2009 03:52:12 -0700 |
Issue status update for
http://smalltalk.gnu.org/project/issue/316
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/316
Project: GNU Smalltalk
Version: <none>
Component: Base classes
Category: bug reports
Priority: normal
Assigned to: bonzinip
Reported by: MrGwen
Updated by: bonzinip
-Status: active
+Status: fixed
And here is the fix, pushed as 6f7344d:
diff --git a/kernel/Float.st b/kernel/Float.st
index af73a86..f3affe7 100644
--- a/kernel/Float.st
+++ b/kernel/Float.st
@@ -319,6 +319,13 @@ if the hardware supports it.'>
^self ln / self class ln10
]
+ log: aNumber [
+ "Answer log base aNumber of the receiver"
+
+
+ ^self ln / (self coerce: aNumber) ln
+ ]
+
ceilingLog: radix [
"Answer (self log: radix) ceiling."