5.should.be.approximately(5.1, error = 0.11); 5.should.approximately.be(5.1, error = 0.11); 0.should.approximately.equal(1.0, error = 1.1); 0.should.approximately.equal(-1.0, error = 1.1); 0.should.not.approximately.equal(1, error = 0.1); 42.3.should.be.approximately(42.3, error = 1e-3);
.approximately is a word indicating an approximate value comparison. When using .approximately, only the words .be and .equal may be used, though they may appear before or after. Each must be called with an additional parameter, error = <float>, indicating the amount of permissible error.