From 42d0fa0fca21bb6f647758a06adf2d847ac51b13 Mon Sep 17 00:00:00 2001 From: hemalvarambhia Date: Sat, 6 Jan 2024 18:11:35 +0000 Subject: [PATCH] test: added another missing test. --- src/Math-Tests-Complex/PMComplexNumberTest.class.st | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Math-Tests-Complex/PMComplexNumberTest.class.st b/src/Math-Tests-Complex/PMComplexNumberTest.class.st index 464e83bb..dfa9363a 100644 --- a/src/Math-Tests-Complex/PMComplexNumberTest.class.st +++ b/src/Math-Tests-Complex/PMComplexNumberTest.class.st @@ -637,6 +637,16 @@ PMComplexNumberTest >> testRaisedTo [ self assert: c3 imaginary closeTo: c imaginary ] +{ #category : #'testing - mathematical functions' } +PMComplexNumberTest >> testRaisedToFractionalIndex [ + + | z expected | + z := 1 / 2 + (3 sqrt / 2) i. + "Here, we appeal to de Moivre's theorem to compute the expected answer" + expected := 3 sqrt / 2 + (1 / 2) i. + self assert: (z raisedTo: 1 / 2) equals: expected +] + { #category : #'testing - mathematical functions' } PMComplexNumberTest >> testRaisedToInteger [