assert.approx_equal
Asserts that two floats are within `eps` of each other.
Reference version
Signature
function assert.approx_equal(actual: float, expected: float, eps: float) -> void
Asserts that two floats are within eps of each other.
Parameters
actual: The observed floating-point value.expected: The expected floating-point value.eps: The maximum allowed absolute difference (|actual - expected|).
Panics
baml.panics.AssertionFailedwhenepsis negative or NaN.baml.panics.AssertionFailedwhen the absolute difference exceedsepsor cannot be compared (for example, whenactual/expectedproduce NaN deltas).
Source:<builtin>/assert/assert.bamlbytes 2472–3014