IntervalProd.approx_equals¶
- IntervalProd.approx_equals(other, atol)[source]¶
Return
True
ifother
is equal to this set up toatol
.- Parameters:
- other
Object to be tested.
- atolfloat
Maximum allowed difference in maximum norm between the interval endpoints.
Examples
>>> rbox1 = IntervalProd(0, 0.5) >>> rbox2 = IntervalProd(0, np.sqrt(0.5)**2) >>> rbox1.approx_equals(rbox2, atol=0) # Numerical error False >>> rbox1.approx_equals(rbox2, atol=1e-15) True