diff --git a/src/shared/cvmix_math.F90 b/src/shared/cvmix_math.F90 index cdf6fcdca..64d6a302b 100644 --- a/src/shared/cvmix_math.F90 +++ b/src/shared/cvmix_math.F90 @@ -244,7 +244,7 @@ function cvmix_math_evaluate_cubic(coeffs, x_in, fprime) cvmix_math_evaluate_cubic = cvmix_math_evaluate_cubic + & coeffs(i)*(x_in**(i-1)) if (present(fprime).and.(i.gt.2)) & - fprime = fprime + real(i-1,cvmix_r8)*(x_in**(i-2)) + fprime = fprime + coeffs(i)*real(i-1,cvmix_r8)*(x_in**(i-2)) end do end function cvmix_math_evaluate_cubic