{"id":63461,"library":"approx-eq","title":"Approx Eq","description":"A macro for comparing equality of two values up to an arbitrary error in the relative difference.","status":"active","version":"0.1.8","language":"rust","source_language":null,"source_url":"https://github.com/al-jshen/approx_eq","tags":["comparison","floating-point","macro","testing"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\napprox_eq = \"0.1.8\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add approx_eq","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"approx_eq","correct":"use approx_eq::approx_eq;"}],"quickstart":{"code":"use approx_eq::approx_eq;\n\nfn main() {\n    let a = 1.0001;\n    let b = 1.0002;\n    if approx_eq!(f64, a, b, epsilon = 0.001) {\n        println!(\"Values are approximately equal\");\n    }\n}","lang":"rust","description":"Compare two floating-point values with a relative error tolerance."},"warnings":[],"env_vars":null,"search_vec":"'approx':1 'arbitrari':14 'compar':6 'comparison':20 'differ':19 'eq':2 'equal':7 'error':15 'float':22 'floating-point':21 'macro':4,24 'point':23 'relat':18 'test':25 'two':9 'valu':10","created_at":"2026-06-17T16:44:13.829232+00:00","updated_at":"2026-06-17T16:44:13.829232+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/al-jshen/approx_eq","github":"https://github.com/al-jshen/approx_eq","docs":"https://docs.rs/approx_eq/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}