David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.457.mcz
==================== Summary ====================
Name: Kernel-dtl.457
Author: dtl
Time: 3 June 2010, 9:30:53.666 pm
UUID: 9fefe953-125d-4872-b44c-8cddad771beb
Ancestors: Kernel-mtf.456, Kernel-nice.453
Merge Kernel-nice.453
=============== Diff against Kernel-mtf.456 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.457.mcz
==================== Summary ====================
Name: Kernel-dtl.457
Author: dtl
Time: 3 June 2010, 9:30:53.666 pm
UUID: 9fefe953-125d-4872-b44c-8cddad771beb
Ancestors: Kernel-mtf.456, Kernel-nice.453
Merge Kernel-nice.453
=============== Diff against Kernel-mtf.456 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.457.mcz
==================== Summary ====================
Name: Kernel-dtl.457
Author: dtl
Time: 3 June 2010, 9:30:53.666 pm
UUID: 9fefe953-125d-4872-b44c-8cddad771beb
Ancestors: Kernel-mtf.456, Kernel-nice.453
Merge Kernel-nice.453
=============== Diff against Kernel-mtf.456 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.453.mcz
==================== Summary ====================
Name: Kernel-nice.453
Author: nice
Time: 28 May 2010, 9:37:49.978 pm
UUID: 5961f8b3-0010-b643-b1d1-56bd1e657937
Ancestors: Kernel-ar.452
After recent vwnc post, don't let LargeInteger ln overflow.
Same for Fraction with LargeInteger.
Also avoid loss of precision due to gradual underflow.
=============== Diff against Kernel-ar.452 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.453.mcz
==================== Summary ====================
Name: Kernel-nice.453
Author: nice
Time: 28 May 2010, 9:37:49.978 pm
UUID: 5961f8b3-0010-b643-b1d1-56bd1e657937
Ancestors: Kernel-ar.452
After recent vwnc post, don't let LargeInteger ln overflow.
Same for Fraction with LargeInteger.
Also avoid loss of precision due to gradual underflow.
=============== Diff against Kernel-ar.452 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.453.mcz
==================== Summary ====================
Name: Kernel-nice.453
Author: nice
Time: 28 May 2010, 9:37:49.978 pm
UUID: 5961f8b3-0010-b643-b1d1-56bd1e657937
Ancestors: Kernel-ar.452
After recent vwnc post, don't let LargeInteger ln overflow.
Same for Fraction with LargeInteger.
Also avoid loss of precision due to gradual underflow.
=============== Diff against Kernel-ar.452 ===============
Item was added:
+ ----- Method: Integer>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow."
+ | res h |
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ h := self highBit.
+ ^2 ln * h + (self / (1 << h)) asFloat ln!
Item was added:
+ ----- Method: Fraction>>ln (in category 'mathematical functions') -----
+ ln
+ "This function is defined because super ln might overflow.
+ Note that < 1 is tested before converting to float in order to avoid precision loss due to gradual underflow."
+ | res int |
+ self < 1 ifTrue: [^self reciprocal ln negated].
+ self <= 0 ifTrue: [self error: 'ln is only defined for x > 0'].
+ res := super ln.
+ res isFinite ifTrue: [^res].
+ int := self integerPart.
+ ^int ln + (self / int) ln!
Matthew Fulmer uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mtf.456.mcz
==================== Summary ====================
Name: Kernel-mtf.456
Author: mtf
Time: 3 June 2010, 11:05:37.324 am
UUID: b1e05e80-6bc8-47fd-adda-82388483e604
Ancestors: Kernel-mtf.455
Added a utility method to Behavior for testing whether a method is compiled correctly without overwriting the incorrectly compiled method if not
=============== Diff against Kernel-mtf.455 ===============
Item was added:
+ ----- Method: Behavior>>sourceMatchesBytecodeAt: (in category 'testing') -----
+ sourceMatchesBytecodeAt: selector
+ "Answers true if the source code at the selector compiles to the bytecode at the selector, and false otherwise. Implemented to detect an error where Monticello did not recompile sources when the class shape changed"
+ "This code was copied from #recompile:from:, with few changes. Several methods would benefit from a method which turned a selector and class into a CompiledMethod, without installing it into the methodDictionary"
+
+ | method trailer methodNode |
+ method := self compiledMethodAt: selector.
+ trailer := method trailer.
+ methodNode := self compilerClass new
+ compile: (self sourceCodeAt: selector)
+ in: self
+ notifying: nil
+ ifFail: [^ false]. "Assume OK after proceed from SyntaxError"
+ selector == methodNode selector ifFalse: [self error: 'selector changed!!'].
+ ^ (methodNode generate: trailer) = method!