Subroutine to integrate polynomial (in place)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfqp), | intent(inout) | :: | p(0:n) | |||
integer, | intent(in), | value | :: | n |
subroutine poly_int(p, n)
integer, intent(in), value :: n
real(pfqp), intent(inout) :: p(0:n)
integer :: j
real(pfqp) :: pp(0:n)
pp = 0.0_pfqp
do j = 0, n-1
pp(j+1) = p(j) / (j+1)
end do
p = pp
end subroutine poly_int