calculate the prefactor for the d-th coefficient of the n-th derivative of a polynomial
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | D | |||
| integer, | intent(in) | :: | deriv |
PURE FUNCTION poly_derivative_prefactor(D,deriv) RESULT(prefactor) INTEGER, INTENT(IN) :: D,deriv INTEGER :: i REAL(wp) :: prefactor ! CODE --------------------------------------------------------------------------------------------------------------------------! prefactor = 1.0_wp DO i=D-deriv+1,D prefactor = prefactor*i END DO END FUNCTION poly_derivative_prefactor