@@ -245,22 +245,22 @@ PMPolynomialTest >> testPolynomialRoots [
245245{ #category : #' iterative algorithms' }
246246PMPolynomialTest >> testPolynomialRootsConstantsHaveNoRoots [
247247
248- | polynomial |
248+ | constant |
249249 " Here, compute the roots of the constant C = 1"
250- polynomial := PMPolynomial coefficients: #( 1 ) .
250+ constant := PMPolynomial coefficients: #( 1 ) .
251251 self
252- should: [ polynomial roots ]
252+ should: [ constant roots ]
253253 raise: Error
254254 description: ' Function' ' s derivative seems to be zero everywhere'
255255]
256256
257257{ #category : #' iterative algorithms' }
258258PMPolynomialTest >> testPolynomialRootsForLinear [
259259
260- | polynomial roots |
260+ | linearPolynomial roots |
261261 " Here, compute the roots of the linear (2x + 1)"
262- polynomial := PMPolynomial coefficients: #( 1 2 ) .
263- roots := polynomial roots.
262+ linearPolynomial := PMPolynomial coefficients: #( 1 2 ) .
263+ roots := linearPolynomial roots.
264264 self assert: roots size equals: 1 .
265265 self assert: (roots at: 1 ) closeTo: - 0.5
266266]
@@ -279,10 +279,10 @@ PMPolynomialTest >> testPolynomialSubtraction [
279279
280280{ #category : #' iterative algorithms' }
281281PMPolynomialTest >> testPolynomialWithRepeatedRoots [
282- | polynomial roots |
282+ | polynomialWithRepeatedRoots roots |
283283 " Here, compute the roots of the quadratic (2x + 1)^2 = 4 x^2 + 4 x + 1"
284- polynomial := PMPolynomial coefficients: #(1 4 4) .
285- roots := polynomial roots .
284+ polynomialWithRepeatedRoots := PMPolynomial coefficients: #(1 4 4) .
285+ roots := polynomialWithRepeatedRoots roots .
286286 self assert: roots size equals: 2 .
287287 self assert: (roots at: 1 ) closeTo: - 0.5 .
288288 self assert: (roots at: 2 ) closeTo: - 0.5 .
0 commit comments