verify/function_bounds
verify approximate equality between two function plots
Calling Sequence
Parameters
Description
Examples
verify(P, Q, function_bounds)
P, Q
-
anything
The verify(P, Q, function_bounds) calling sequence verifies the approximate equality between two function plots.
The parameters, P and Q, are assumed to be either PLOT data structures, sets or lists of CURVES data structures, or a CURVES data structure.
The verify(P, Q, function_bounds) function returns true for CURVES data-structures P and Q by checking that neither curve has extreme points or constant regions which do not appear in the other curve or in the union of the two curves.
If you are comparing two curves, false is returned by a list with false in the first operand and a plot data-structure showing the points where the curves differ.
a≔plot⁡piecewise⁡x<1,x,2−x,x=0..2,adaptive=true:
b≔plot⁡piecewise⁡x<1,x,2−x,x=0..2,numpoints=10,adaptive=false:
c≔plot⁡1.001⁢piecewise⁡x<1,x,2−x,x=0..2,numpoints=100,adaptive=true:
verify⁡a,b,function_bounds
true
verify⁡a,c,function_bounds
false,PLOT⁡...
Note that the plot 'b' does not have the last maxima.
a≔plot⁡sin⁡x,x=0..40,adaptive=true:
b≔plot⁡sin⁡x,x=0..40,numpoints=20,adaptive=false:
c≔plot⁡sin⁡x,x=0..40,numpoints=30,adaptive=false:
See Also
piecewise
plot
verify
verify/function_shells
verify/plot
Download Help Document