easier to understand (and maybe failsafe against empty coef)

This commit is contained in:
Philip Eisenlohr 2023-09-26 22:27:28 +00:00
parent c619bed975
commit 836ddb4ba5
1 changed files with 3 additions and 3 deletions

View File

@ -105,9 +105,9 @@ pure function eval(self,x) result(y)
integer :: o
y = self%coef(ubound(self%coef,1))
do o = ubound(self%coef,1)-1, 0, -1
y = y*(x-self%x_ref) +self%coef(o)
y = 0.0_pREAL
do o = ubound(self%coef,1), 0, -1
y = y*(x-self%x_ref) + self%coef(o)
end do
end function eval