David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.79.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.79
Author: dtl
Time: 24 April 2022, 1:42:51.885752 pm
UUID: 6f7605b0-2d71-404a-bb89-0a18345f875a
Ancestors: Chronology-Core-mt.78
Provide a better method comment for DateAndTime>>offset: to address a long-standing #FIXME flag. We now have #utcOffset: to complement #offset: so a better explanation of the behavior is sufficient to clarify the difference.
=============== Diff against Chronology-Core-mt.78 ===============
Item was changed:
----- Method: DateAndTime>>offset: (in category 'ansi protocol') -----
offset: anOffset
+ "Answer a DateAndTime for a different time zone offset that has the same
+ year, month, day, hour, minute, and second as this instance, and with
+ printString that matches except for time zone offset."
- "Answer a <DateAndTime> equivalent to the receiver but with its local time
- being offset from UTC by offset."
-
| newOffset newMicros |
- self flag: #FIXME. "check the definition of this and of #utcOffset:"
newOffset := anOffset asDuration asSeconds.
newMicros := localOffsetSeconds - newOffset * 1000000 + utcMicroseconds.
^ self class utcMicroseconds: newMicros offset: newOffset
!
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.420.mcz
==================== Summary ====================
Name: KernelTests-nice.420
Author: nice
Time: 24 April 2022, 4:47:16.037785 pm
UUID: e3105d5f-ab18-45ba-bc8c-634d1b07d39d
Ancestors: KernelTests-ct.419
Test Complex sqrt
=============== Diff against KernelTests-ct.419 ===============
Item was added:
+ ----- Method: ComplexTest>>testSqrt (in category 'tests') -----
+ testSqrt
+ -3 to: 3 do: [:re | -2 to: 2 do: [:im |
+ | c s t |
+ c := re asFloat + im asFloat i.
+ s := c sqrt.
+ t := s squared.
+ self assert: (t real - c real) abs / 4 < c abs asFloat ulp.
+ self assert: (t imaginary - c imaginary) abs / 4 < c abs asFloat ulp.
+ self assert: s imaginary signBit = c imaginary signBit]]!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1460.mcz
==================== Summary ====================
Name: Kernel-nice.1460
Author: nice
Time: 24 April 2022, 4:40:46.56674 pm
UUID: c06981bc-7eba-4a8e-a388-658d43b49ec8
Ancestors: Kernel-nice.1459
Oups fixup (2 i sqrt), not enough tests...
Sorry for the noise.
=============== Diff against Kernel-nice.1459 ===============
Item was changed:
----- Method: Complex>>sqrt (in category 'mathematical functions') -----
sqrt
+ "Return the square root of the receiver with a positive real part.
+ This is the same as (Complex abs: self abs sqrt arg: self arg / 2).
- "Return the square root of the receiver with a positive imaginary part.
Implementation notes:
the formulation used ensure a protection against floating point overflow/underflow.
it also result in a reasonable precision (around 3 ulp).
It is inspired by following reference, except that it uses pre-scaling rather than eception handling:
Implementing Complex Elementary Function Using Exception Handling
ACM Transactions on Mathematical Software - October 1994
Ping Tang and 3 other authors"
| x y r s t scale |
real isZero
ifTrue:
+ [t := imaginary abs sqrt / 2 sqrt.
- [t := imaginary abs sqrt.
^self class real: t imaginary: (imaginary copySignTo: t)].
scale := real abs max: imaginary abs.
x := real / scale.
y := imaginary / scale.
r := (x squared + y squared) sqrt.
s := scale sqrt.
t := (r + x abs * 2) sqrt.
^real > 0
ifTrue: [self class real: t * s / 2 imaginary: y * s / t]
ifFalse: [self class real: y abs * s / t imaginary: (y copySignTo: t * s / 2)]!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1459.mcz
==================== Summary ====================
Name: Kernel-nice.1459
Author: nice
Time: 23 April 2022, 9:40:29.771092 pm
UUID: 5aa845dd-8c95-4a0f-9b68-afdac84b11e7
Ancestors: Kernel-mt.1458
Fix some avoidable floating point overflow/underflow/divisionByZero in Complex>>#sqrt
This was reported at: https://github.com/PolyMathOrg/PolyMath/issues/221
=============== Diff against Kernel-mt.1458 ===============
Item was changed:
----- Method: Complex>>sqrt (in category 'mathematical functions') -----
sqrt
+ "Return the square root of the receiver with a positive imaginary part.
+ Implementation notes:
+ the formulation used ensure a protection against floating point overflow/underflow.
+ it also result in a reasonable precision (around 3 ulp).
+ It is inspired by following reference, except that it uses pre-scaling rather than eception handling:
+ Implementing Complex Elementary Function Using Exception Handling
+ ACM Transactions on Mathematical Software - October 1994
+ Ping Tang and 3 other authors"
- "Return the square root of the receiver with a positive imaginary part."
+ | x y r s t scale |
+ real isZero
+ ifTrue:
+ [t := imaginary abs sqrt.
+ ^self class real: t imaginary: (imaginary copySignTo: t)].
+ scale := real abs max: imaginary abs.
+ x := real / scale.
+ y := imaginary / scale.
+ r := (x squared + y squared) sqrt.
+ s := scale sqrt.
+ t := (r + x abs * 2) sqrt.
+ ^real > 0
+ ifTrue: [self class real: t * s / 2 imaginary: y * s / t]
+ ifFalse: [self class real: y abs * s / t imaginary: (y copySignTo: t * s / 2)]!
- | u v |
- (imaginary = 0 and: [real >= 0])
- ifTrue: [^self class real: real sqrt imaginary: 0].
- v := (self abs - real / 2) sqrt.
- u := imaginary / 2 / v.
- ^self class real: u imaginary: v!
Marcel Taeumel uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-mt.258.mcz
==================== Summary ====================
Name: Network-mt.258
Author: mt
Time: 21 April 2022, 3:31:58.648745 pm
UUID: d388d057-b316-514d-9611-399f0ba1eef7
Ancestors: Network-mt.257
Remove #= and #hash again from Url since it is abstract.
=============== Diff against Network-mt.257 ===============
Item was removed:
- ----- Method: Url>>= (in category 'comparing') -----
- = anObject
-
- self == anObject ifTrue: [^ true].
-
- self class == anObject class ifFalse: [^ false].
- self fragment = anObject fragment ifFalse: [ ^ false ].
-
- ^ true!
Item was removed:
- ----- Method: Url>>hash (in category 'comparing') -----
- hash
-
- ^ fragment hash!