pure function minFunBplus2(b) result(ret) real(dp), intent(in) :: b real(dp) :: ret ret = -(b + 2.0_dp) end function minFunBplus2