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 a585d96 commit 22005cbCopy full SHA for 22005cb
src/Math-Tests-Polynomials/PMPolynomialTest.class.st
@@ -242,6 +242,16 @@ PMPolynomialTest >> testPolynomialRoots [
242
self assert: (roots at: 3) - 5 closeTo: 0
243
]
244
245
+{ #category : #'iterative algorithms' }
246
+PMPolynomialTest >> testPolynomialRootsForQuadratic [
247
+ | polynomial roots |
248
+ polynomial := PMPolynomial coefficients: #(1 2 1).
249
+ roots := polynomial roots .
250
+ self assert: roots size equals: 2.
251
+ self assert: (roots at: 1) closeTo: -1 .
252
+ self assert: (roots at: 2) closeTo: -1 .
253
+]
254
+
255
{ #category : #'function evaluation' }
256
PMPolynomialTest >> testPolynomialSubtraction [
257
| polynomial |
0 commit comments