solve_roots Interface

public interface solve_roots

Contents


Module Procedures

private subroutine solve_roots_dp(f, x, tol, lerr)

Uses Brent’s method to find the root of a function f

Arguments

TypeIntentOptionalAttributesName
private function f(x) result(y)
Arguments
TypeIntentOptionalAttributesName
real(kind=DP), intent(in) :: x
Return Value real(kind=DP)
real(kind=DP), intent(inout) :: x

Initial guess and also the final answer

real(kind=DP), intent(in), optional :: tol

The relative tolerance on the solution

logical, intent(out), optional :: lerr

Returns .true. if a root was found, otherwise returns .false.