Method on @infsup: polyval (P, X)

Evaluate polynomial P with argument X.

Horner’s scheme is used to evaluate a first approximation. The result is improved with iterative refinement.

Accuracy: The result is a tight enclosure for polynomials of degree 1 or less. For polynomials of higher degree the result is a valid enclosure. For X being no singleton interval, the algorithm suffers from the dependency problem.

output_precision (16, 'local')
polyval (infsup ([3 4 2 1]), 42) # 3x^3 + 4x^2 + 2x^1 + 1 |x = 42
  ⇒ [229405]
polyval (infsup ([3 4 2 1]), "42?") # ... |x = 41.5 .. 42.5
  ⇒ [221393.125, 237607.875]

See also: @infsup/fzero.

Package: interval