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 d4912c5 commit d2905e9Copy full SHA for d2905e9
src/Math-Tests-Complex/PMComplexTest.class.st
@@ -626,6 +626,17 @@ PMComplexTest >> testSquareRootOfANegativeRealNumberIsPureImaginary [
626
self assert: squareRoot equals: 2 i.
627
]
628
629
+{ #category : #tests }
630
+PMComplexTest >> testSquareRootOfComplexNumberIsAComplexNumber [
631
+ | squareRoot z |
632
+ z := PMComplex real: 2 imaginary: 2.
633
+
634
+ squareRoot := z sqrt.
635
636
+ self assert: squareRoot real closeTo: 1.55377397.
637
+ self assert: squareRoot imaginary closeTo: 0.643594253
638
+]
639
640
{ #category : #tests }
641
PMComplexTest >> testSquareRootOfNegativePureImaginaryNumberIsAComplexNumberWithRealAndImaginaryParts [
642
| squareRoot expected pureImaginaryNumber |
0 commit comments