We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33bfd2c commit a69b655Copy full SHA for a69b655
src/Math-Tests-Complex/PMComplexTest.class.st
@@ -617,6 +617,15 @@ PMComplexTest >> testSinh [
617
self assert: (c sinh imaginary closeTo: c2 imaginary).
618
]
619
620
+{ #category : #tests }
621
+PMComplexTest >> testSquareRootOfANegativeRealNumberIsPureImaginary [
622
+ "Given z = -4 + 0 i, the square root is 2 i"
623
+
624
+ | squareRoot |
625
+ squareRoot := (PMComplex real: -4 imaginary: 0) sqrt .
626
+ self assert: squareRoot equals: 2 i.
627
+]
628
629
{ #category : #tests }
630
PMComplexTest >> testSquared [
631
"self run: #testSquared"
0 commit comments