verify/function_shells
verify approximate equality between two function plots
Calling Sequence
Parameters
Description
Examples
verify(P, Q, function_shells(epsilon))
P, Q
-
anything
epsilon
non-negative value
The verify(P, Q, function_shells) 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_shells) returns true for CURVES data structures P and Q if the points of each curve fall within an epsilon shell of a linear piecewise interpolation of the points of the other curve.
The points in the CURVES data structure must be in order and the x-coordinates must be monotonically increasing.
If P or Q are PLOT data structures or sets or lists of CURVES data structures, it checks that for each CURVES data structure in either P or Q, there exists a CURVES data structure in the other set which matches it.
This procedure does not compare any other features of the PLOT or CURVES data structures.
a≔plot⁡sin⁡x,x=0..1:
b≔plot⁡sin⁡x,x=0..1,numpoints=10,adaptive=false:
c≔plot⁡sin⁡x,x=0..1,numpoints=37,adaptive=false:
d≔plot⁡sin⁡x+x10,x=0..1:
verify⁡a,b,function_shells⁡0.01
true
verify⁡a,c,function_shells⁡0.01
verify⁡a,d,function_shells⁡0.01
false,0.102500000000000,0.102320612500000,0.102500000000000,0.112570612500000
verify⁡a,d,function_shells⁡0.1
See Also
plot
verify
verify/function_bounds
verify/plot
Download Help Document