:- use_module(library(clpBNR)).
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.