<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Nicolas --<div><br></div><div>You forgot to commit #isFinite on Integer? Many ComplexTest tests are failing:</div><div><span style="font-size: 13.3333px">https://github.com/squeak-smalltalk/squeak-app/runs/6302546226?check_suite_focus=true</span><br></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Best,</span></div><div><span style="font-size: 13.3333px">Marcel</span></div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 27.04.2022 17:18:13 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style='font-family:Arial,Helvetica,sans-serif'>Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:<br>http://source.squeak.org/trunk/KernelTests-nice.422.mcz<br><br>==================== Summary ====================<br><br>Name: KernelTests-nice.422<br>Author: nice<br>Time: 26 April 2022, 1:03:31.73252 pm<br>UUID: e963a1d7-702a-904d-8b40-8dbf96032f0d<br>Ancestors: KernelTests-nice.421<br><br>Complex tests associated with that suggestion: complex arithmetic should detect case of overflow in intermediate computations and fallback to securedely scaled operations if it's the case.<br><br>=============== Diff against KernelTests-nice.421 ===============<br><br>Item was changed:<br>  ----- Method: ComplexTest>>testDivision1 (in category 'tests') -----<br>  testDivision1<br>          "self run: #testDivision1"<br>          "self debug: #testDivision1"<br>        <br>      | c1 c2 quotient |<br>    c1 := 2.0e252 + 3.0e70 i.<br>     c2 := c1.<br>     quotient := c1 / c2.<br>-         self deny: (quotient - 1) isZero.<br>     <br>+     "This used to fail when / was not protected against floating point overflow in intermediate computations<br>+        but it should now work correctly if divideSecureBy: is correctly used as fallback case"<br>+         self assert: (quotient - 1) isZero<br>-   "This test fails due to the wonders of floating point arithmetic. <br>-       Please have a look at Complex>>divideSecureBy: and #divideFastAndSecureBy:<br>-    how this can be avoided."<br>        <br>  !<br><br>Item was added:<br>+ ----- Method: ComplexTest>>testMultiplyDoesNotOverflow (in category 'tests') -----<br>+ testMultiplyDoesNotOverflow<br>+  <br>+     | c1 c2 product smallProduct scale |<br>+         c1 := (1 + 1 i) sqrt * Float fmax sqrt.<br>+      product := c1 squared.<br>+       self assert: product real isFinite.<br>+  self assert: product imaginary isFinite.<br>+     self assert: (product real - Float fmax) / Float fmax ulp < 3.<br>+    self assert: (product imaginary - Float fmax) / Float fmax ulp < 3.<br>+ <br>+   "a more tricky case"<br>+       c1 := 1.0 + 0.25 i.<br>+  c2 := 1.125+ 0.5 i.<br>+  smallProduct := c1 * c2.<br>+     "check that we will not overflow in precondition"<br>+  self assert: smallProduct real abs <= 1.<br>+  self assert: smallProduct imaginary abs <= 1.<br>+     "now retry with a large scale"<br>+     scale := Float fmax.<br>+         product := c1 * scale * c2.<br>+  self assert: product real isFinite.<br>+  self assert: product imaginary isFinite.<br>+     self assert: (scale * smallProduct real - product real) / (scale * smallProduct real) ulp < 3.<br>+    self assert: (scale * smallProduct imaginary - product imaginary) / (scale * smallProduct imaginary) ulp < 3.!<br><br>Item was added:<br>+ ----- Method: ComplexTest>>testReciprocalDoesNotOverflow (in category 'tests') -----<br>+ testReciprocalDoesNotOverflow<br>+  "Note: intermediate overflow might cause the answer to be zero in careless implementation"<br>+         <br>+     | c scale cScaled cScaledInv expected |<br>+      c := (1 + 1i).<br>+       scale := Float fmax.<br>+         cScaled := c * scale.<br>+        cScaledInv := cScaled reciprocal.<br>+    expected := c reciprocal real / scale + (c reciprocal imaginary / scale) i.<br>+  self assert: (expected real- cScaledInv real) abs / expected real ulp < 3.<br>+        self assert: (expected imaginary - cScaledInv imaginary) abs / expected imaginary ulp < 3.!<br><br><br></div></blockquote>
                                        </div></body>