Reduces the order of a polynomial by division
Note
This routine is no longer used.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | c(:) |
Polynomial coefficients |
||
| integer(kind=ip), | intent(in) | :: | n |
Order + 1 of polynomial |
||
| real(kind=dp), | intent(in) | :: | root |
A single real root of the polynomial |
||
| real(kind=dp), | intent(inout) | :: | c_new(:) |
Output array with new coefficients |
pure subroutine deflate_polynomial(c, n, root, c_new) real(dp), intent(in) :: c(:) !! Polynomial coefficients integer(ip), intent(in) :: n !! Order + 1 of polynomial real(dp), intent(in) :: root !! A single real root of the polynomial real(dp), intent(inout) :: c_new(:) !! Output array with new coefficients integer(ip) :: i real(dp) :: sum, s sum = c(n) do i = n - 1, 1, -1 s = c(i) c_new(i) = sum sum = s + sum * root end do end subroutine deflate_polynomial