Availability::- use_module(library(clpBNR)).
 global_maximum(+Exp, ?Z:numeric) is semidet
Succeeds if Z unifies with the global maximum of (evaluated) expression Exp; otherwise fails. Exp must be an actual expression which can be evaluated as part of the search for the global optima, not an interval equal to the evaluated expression. Any solutions will be constrained to be at the global maximum which may result in narrowing any intervals in Exp.

The maximum allowable width for the generated maximum is determined by the current default precision (environment flag clpBNR_default_precision). Example:

?- X::real(0,3r4*pi), global_maximum(X*sin(4*X),Z).
X:: 1.994...,
Z:: 1.97918... .

Note that intervals in the expression may not narrow significantly if more than one maximum can found using the the initial domains. In such cases, additional "searching", e.g., using solve/1, may be necessary.

See also
- global_maximize/2