File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -292,12 +292,11 @@ def calculate(self, x):
292
292
return sum (ak * (x ** k ) for ak , k in self .terms )
293
293
294
294
def calculate_horner (self , x ):
295
- """Calculate the value of the polynomial at a given point
296
- using Horner`s method.
295
+ """Calculate the value of the polynomial at a given point.
297
296
298
- This method is faster than calling calculate for almost all
299
- polynomials except monomials but might produce slightly different
300
- results when using floats.
297
+ This method is using Horner`s method and faster than calling
298
+ calculate for almost all polynomials except monomials but might
299
+ produce slightly different results when using floats.
301
300
"""
302
301
result = 0
303
302
for coeff in self :
You can’t perform that action at this time.
0 commit comments