Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.264.mcz
==================== Summary ====================
Name: KernelTests-nice.264
Author: nice
Time: 21 March 2014, 6:40:48.635 pm
UUID: e99bef3c-6fa7-8d4f-b491-f9ef0f98ed63
Ancestors: KernelTests-nice.263
A non regression test for just found sqrtFloor bug.
=============== Diff against KernelTests-nice.263 ===============
Item was added:
+ ----- Method: LargePositiveIntegerTest>>testLargeSqrtFloor (in category 'tests') -----
+ testLargeSqrtFloor
+ "This test fails if a careless implementation naivly factors out the power of two (remove the trailing zeroes up to lowBit).
+ This was the case in a previous Squeak 4.x implementation."
+
+ | large root |
+ large := (SmallInteger maxVal << 100 + 1) << 100.
+ root := large sqrtFloor.
+ self assert: root squared <= large.
+ self assert: (root+1) squared > large.!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.843.mcz
==================== Summary ====================
Name: Kernel-nice.843
Author: nice
Time: 21 March 2014, 6:28:55.456 pm
UUID: 28ea5418-9be7-964b-b0c1-fde1bf8528a3
Ancestors: Kernel-nice.842
Correct the bug I introduced for large integer sqrtFloor.
If receiver was of the form 2^2n*u
we did answer 2^n *E(sqrt(u))
But sqrt(u) = E(sqrt(u)) + residue
where 0<=residue<1
And result is rather
E(2^n*sqrt(u))
= E( 2^n*(E(sqrt(u)) + residue))
= 2^n*E(sqrt(u)) + E(2^n*residue)
As 2^n * residue can be big (superior to 1), we miss the correct value by default.
If we want to correct this, an approximation of residue is (u-E(sqrt(u))^2) / 2 E(sqrt(u))
This is more or less like super Newton-Raphson inner loop...
It would be possible to duplicate super work, but I feel like it's adding too much complexity for small reward, so I prefer to remove offending code for now
=============== Diff against Kernel-nice.842 ===============
Item was removed:
- ----- Method: LargePositiveInteger>>sqrtFloor (in category 'mathematical functions') -----
- sqrtFloor
- "Return the integer part of the square root of self"
-
- | powerOfTwo |
- (powerOfTwo := self lowBit - 1 // 2) > 1
- ifFalse: [^super sqrtFloor].
- ^(self bitShift: -2 * powerOfTwo) sqrtFloor bitShift: powerOfTwo!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.843.mcz
==================== Summary ====================
Name: Kernel-nice.843
Author: nice
Time: 21 March 2014, 6:28:55.456 pm
UUID: 28ea5418-9be7-964b-b0c1-fde1bf8528a3
Ancestors: Kernel-nice.842
Correct the bug I introduced for large integer sqrtFloor.
If receiver was of the form 2^2n*u
we did answer 2^n *E(sqrt(u))
But sqrt(u) = E(sqrt(u)) + residue
where 0<=residue<1
And result is rather
E(2^n*sqrt(u))
= E( 2^n*(E(sqrt(u)) + residue))
= 2^n*E(sqrt(u)) + E(2^n*residue)
As 2^n * residue can be big (superior to 1), we miss the correct value by default.
If we want to correct this, an approximation of residue is (u-E(sqrt(u))^2) / 2 E(sqrt(u))
This is more or less like super Newton-Raphson inner loop...
It would be possible to duplicate super work, but I feel like it's adding too much complexity for small reward, so I prefer to remove offending code for now
=============== Diff against Kernel-nice.842 ===============
Item was removed:
- ----- Method: LargePositiveInteger>>sqrtFloor (in category 'mathematical functions') -----
- sqrtFloor
- "Return the integer part of the square root of self"
-
- | powerOfTwo |
- (powerOfTwo := self lowBit - 1 // 2) > 1
- ifFalse: [^super sqrtFloor].
- ^(self bitShift: -2 * powerOfTwo) sqrtFloor bitShift: powerOfTwo!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.843.mcz
==================== Summary ====================
Name: Kernel-nice.843
Author: nice
Time: 21 March 2014, 6:28:55.456 pm
UUID: 28ea5418-9be7-964b-b0c1-fde1bf8528a3
Ancestors: Kernel-nice.842
Correct the bug I introduced for large integer sqrtFloor.
If receiver was of the form 2^2n*u
we did answer 2^n *E(sqrt(u))
But sqrt(u) = E(sqrt(u)) + residue
where 0<=residue<1
And result is rather
E(2^n*sqrt(u))
= E( 2^n*(E(sqrt(u)) + residue))
= 2^n*E(sqrt(u)) + E(2^n*residue)
As 2^n * residue can be big (superior to 1), we miss the correct value by default.
If we want to correct this, an approximation of residue is (u-E(sqrt(u))^2) / 2 E(sqrt(u))
This is more or less like super Newton-Raphson inner loop...
It would be possible to duplicate super work, but I feel like it's adding too much complexity for small reward, so I prefer to remove offending code for now
=============== Diff against Kernel-nice.842 ===============
Item was removed:
- ----- Method: LargePositiveInteger>>sqrtFloor (in category 'mathematical functions') -----
- sqrtFloor
- "Return the integer part of the square root of self"
-
- | powerOfTwo |
- (powerOfTwo := self lowBit - 1 // 2) > 1
- ifFalse: [^super sqrtFloor].
- ^(self bitShift: -2 * powerOfTwo) sqrtFloor bitShift: powerOfTwo!
Chris Muller uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-cmm.115.mcz
==================== Summary ====================
Name: ReleaseBuilder-cmm.115
Author: cmm
Time: 17 March 2014, 3:07:59.226 pm
UUID: 96cc1f80-417e-40a9-865e-d5da6c417672
Ancestors: ReleaseBuilder-cmm.114
Added ReleaseBuilder class>>#prepareNextVersionAlpha, for preparing first alpha of next release.
=============== Diff against ReleaseBuilder-cmm.114 ===============
Item was added:
+ ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'scripts') -----
+ prepareNextVersionAlpha
+ "Prepare the first alpha image for next release."
+ SystemVersion
+ newVersion: ((UIManager default request: 'Please specify the name of the\new version of Squeak.' withCRs initialAnswer: SystemVersion current version)
+ ifEmpty: [^ self inform: 'Aborted.']).
+ MCFileBasedRepository flushAllCaches.
+ MCHttpRepository clearPasswords.
+ Utilities setAuthorInitials: String empty.
+ self switchToNewRepository: self buildRepository.
+ Smalltalk condenseSources!
Chris Muller uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-cmm.115.mcz
==================== Summary ====================
Name: ReleaseBuilder-cmm.115
Author: cmm
Time: 17 March 2014, 3:07:59.226 pm
UUID: 96cc1f80-417e-40a9-865e-d5da6c417672
Ancestors: ReleaseBuilder-cmm.114
Added ReleaseBuilder class>>#prepareNextVersionAlpha, for preparing first alpha of next release.
=============== Diff against ReleaseBuilder-cmm.114 ===============
Item was added:
+ ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'scripts') -----
+ prepareNextVersionAlpha
+ "Prepare the first alpha image for next release."
+ SystemVersion
+ newVersion: ((UIManager default request: 'Please specify the name of the\new version of Squeak.' withCRs initialAnswer: SystemVersion current version)
+ ifEmpty: [^ self inform: 'Aborted.']).
+ MCFileBasedRepository flushAllCaches.
+ MCHttpRepository clearPasswords.
+ Utilities setAuthorInitials: String empty.
+ self switchToNewRepository: self buildRepository.
+ Smalltalk condenseSources!
Chris Muller uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-cmm.115.mcz
==================== Summary ====================
Name: ReleaseBuilder-cmm.115
Author: cmm
Time: 17 March 2014, 3:07:59.226 pm
UUID: 96cc1f80-417e-40a9-865e-d5da6c417672
Ancestors: ReleaseBuilder-cmm.114
Added ReleaseBuilder class>>#prepareNextVersionAlpha, for preparing first alpha of next release.
=============== Diff against ReleaseBuilder-cmm.114 ===============
Item was added:
+ ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'scripts') -----
+ prepareNextVersionAlpha
+ "Prepare the first alpha image for next release."
+ SystemVersion
+ newVersion: ((UIManager default request: 'Please specify the name of the\new version of Squeak.' withCRs initialAnswer: SystemVersion current version)
+ ifEmpty: [^ self inform: 'Aborted.']).
+ MCFileBasedRepository flushAllCaches.
+ MCHttpRepository clearPasswords.
+ Utilities setAuthorInitials: String empty.
+ self switchToNewRepository: self buildRepository.
+ Smalltalk condenseSources!
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.669.mcz
==================== Summary ====================
Name: System-cmm.669
Author: cmm
Time: 16 March 2014, 10:02:19.13 pm
UUID: aa83e977-ce6e-468d-8a8b-e51ce624f1b2
Ancestors: System-cmm.668
#moveChanges should prompt for the name of the condensed sources.
=============== Diff against System-cmm.668 ===============
Item was changed:
----- Method: SmalltalkImage>>moveChanges (in category 'housekeeping') -----
moveChanges
"Move the current version of every method in .changes to my .sources file."
+ self appendChangesTo:
+ ((UIManager default
+ request: 'Please specify the name of the\.sources file to move changes to.' withCRs
+ initialAnswer: self sourceFileVersionString) ifEmpty: [ ^ self inform: 'Aborted.' ])!
- self appendChangesTo: self sourceFileVersionString!
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.669.mcz
==================== Summary ====================
Name: System-cmm.669
Author: cmm
Time: 16 March 2014, 10:02:19.13 pm
UUID: aa83e977-ce6e-468d-8a8b-e51ce624f1b2
Ancestors: System-cmm.668
#moveChanges should prompt for the name of the condensed sources.
=============== Diff against System-cmm.668 ===============
Item was changed:
----- Method: SmalltalkImage>>moveChanges (in category 'housekeeping') -----
moveChanges
"Move the current version of every method in .changes to my .sources file."
+ self appendChangesTo:
+ ((UIManager default
+ request: 'Please specify the name of the\.sources file to move changes to.' withCRs
+ initialAnswer: self sourceFileVersionString) ifEmpty: [ ^ self inform: 'Aborted.' ])!
- self appendChangesTo: self sourceFileVersionString!
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.669.mcz
==================== Summary ====================
Name: System-cmm.669
Author: cmm
Time: 16 March 2014, 10:02:19.13 pm
UUID: aa83e977-ce6e-468d-8a8b-e51ce624f1b2
Ancestors: System-cmm.668
#moveChanges should prompt for the name of the condensed sources.
=============== Diff against System-cmm.668 ===============
Item was changed:
----- Method: SmalltalkImage>>moveChanges (in category 'housekeeping') -----
moveChanges
"Move the current version of every method in .changes to my .sources file."
+ self appendChangesTo:
+ ((UIManager default
+ request: 'Please specify the name of the\.sources file to move changes to.' withCRs
+ initialAnswer: self sourceFileVersionString) ifEmpty: [ ^ self inform: 'Aborted.' ])!
- self appendChangesTo: self sourceFileVersionString!