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 1d08970 commit 84b6af9Copy full SHA for 84b6af9
1 file changed
src/Math-Tests-Polynomials/PMPolynomialTest.class.st
@@ -294,9 +294,11 @@ PMPolynomialTest >> testPolynomialRootsForLinear [
294
295
{ #category : #'testing - subtraction' }
296
PMPolynomialTest >> testPolynomialSubtraction [
297
- | polynomial |
298
- polynomial := (PMPolynomial coefficients: #(2 -3 1))
299
- - (PMPolynomial coefficients: #(-3 7 2 1)).
+
+ | polynomial p q |
+ p := PMPolynomial coefficients: #( 2 -3 1 ).
300
+ q := PMPolynomial coefficients: #( -3 7 2 1 ).
301
+ polynomial := p - q.
302
self assert: (polynomial at: 0) equals: 5.
303
self assert: (polynomial at: 1) equals: -10.
304
self assert: (polynomial at: 2) equals: -1.
0 commit comments