.. index:: single: root_finder_protocol .. _root_finder_protocol/0: .. rst-class:: right **protocol** ``root_finder_protocol`` ======================== Protocol for scalar root-finding algorithms. | **Availability:** | ``logtalk_load(numerical_analysis(loader))`` | **Author:** Paulo Moura | **Version:** 1:0:0 | **Date:** 2026-09-04 | **Compilation flags:** | ``static`` | **Dependencies:** | (none) | **Remarks:** | (none) | **Inherited public predicates:** | (none) .. contents:: :local: :backlinks: top Public predicates ----------------- .. index:: find_root/2 .. _root_finder_protocol/0::find_root/2: ``find_root/2`` ^^^^^^^^^^^^^^^ Finds a root using default options. | **Compilation flags:** | ``static`` | **Template:** | ``find_root(Initial,Root)`` | **Mode and number of proofs:** | ``find_root(+compound,-number)`` - ``one_or_error`` | **Exceptions:** | ``Initial`` is a variable: | ``instantiation_error`` | ``Initial`` is not valid for the root finder: | ``domain_error(root_initialization,Initial)`` | The function returns a non-numeric value: | ``domain_error(function_value,Value)`` ------------ .. index:: find_root/3 .. _root_finder_protocol/0::find_root/3: ``find_root/3`` ^^^^^^^^^^^^^^^ Finds a root using the given options. | **Compilation flags:** | ``static`` | **Template:** | ``find_root(Initial,Root,Options)`` | **Mode and number of proofs:** | ``find_root(+compound,-number,+list(compound))`` - ``one_or_error`` | **Exceptions:** | ``Initial`` or ``Options`` is a variable: | ``instantiation_error`` | ``Initial`` is not valid for the root finder: | ``domain_error(root_initialization,Initial)`` | ``Options`` is a variable: | ``instantiation_error`` | ``Options`` is neither a variable nor a list: | ``type_error(list,Options)`` | An element ``Option`` of the list ``Options`` is a variable: | ``instantiation_error`` | An element ``Option`` of the list ``Options`` is neither a variable nor a compound term: | ``type_error(compound,Option)`` | An element ``Option`` of the list ``Options`` is a compound term but not a valid option: | ``domain_error(option,Option)`` | The function returns a non-numeric value: | ``domain_error(function_value,Value)`` ------------ .. index:: find_root/4 .. _root_finder_protocol/0::find_root/4: ``find_root/4`` ^^^^^^^^^^^^^^^ Finds a root and returns run statistics using the given options. | **Compilation flags:** | ``static`` | **Template:** | ``find_root(Initial,Root,Statistics,Options)`` | **Mode and number of proofs:** | ``find_root(+compound,-number,-list(compound),+list(compound))`` - ``one_or_error`` | **Exceptions:** | ``Initial`` or ``Options`` is a variable: | ``instantiation_error`` | ``Initial`` is not valid for the root finder: | ``domain_error(root_initialization,Initial)`` | ``Options`` is a variable: | ``instantiation_error`` | ``Options`` is neither a variable nor a list: | ``type_error(list,Options)`` | An element ``Option`` of the list ``Options`` is a variable: | ``instantiation_error`` | An element ``Option`` of the list ``Options`` is neither a variable nor a compound term: | ``type_error(compound,Option)`` | An element ``Option`` of the list ``Options`` is a compound term but not a valid option: | ``domain_error(option,Option)`` | The function returns a non-numeric value: | ``domain_error(function_value,Value)`` ------------ Protected predicates -------------------- (none) Private predicates ------------------ (none) Operators --------- (none)