Skip to content

Commit

Permalink
test: added another missing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Jan 6, 2024
1 parent d557e73 commit 42d0fa0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Math-Tests-Complex/PMComplexNumberTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 [

Expand Down

0 comments on commit 42d0fa0

Please sign in to comment.