area_tolerance_ok
Stable function · Relational keys and geometry
Tier: stable · Kind: function · Topic: Relational keys and geometry
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | not exported | area_tolerance_ok | area_tolerance_ok | not exported |
Julia
Julia does not export this function.
TypeScript
TypeScript does not export this function.
Python
area_tolerance_ok(area_x: float, area_ref: float, rtol: float, radius: float = 1.0, atol: float | None = None) -> bool
Combined rel+abs area-agreement gate with a sliver floor (B.5 / §5.8.2).
|A_x − A_ref| ≤ atol + rtol·A_ref with atol ≈ 1e-15·R² the sliver
floor: sub-atol areas are treated as equal-to-zero, so a “present-but-tiny”
overlap and an “absent” one both pass. rtol is empirically calibrated
per the loosest binding pair (GeometryOps-vs-S2); Python and Rust share the S2
core and agree far tighter. Pass an explicit atol to override the floor.
Rust
pub fn area_tolerance_ok(area_x: f64, area_ref: f64, rtol: f64, radius: f64) -> bool
The combined relative + absolute area-agreement gate with a sliver floor (B.5 / CONFORMANCE_SPEC.md §5.8.2):
|A_x − A_ref| ≤ atol + rtol·|A_ref|, atol = 1e-15·radius²
Sub-atol areas are snapped to zero first, so a “present-but-tiny” overlap and
an “absent” one both pass — the snapping / tie-break regime MUST NOT fail
conformance (§5.8.2). rtol is empirically calibrated to the loosest binding
pair (GeometryOps-vs-S2); Rust and Python share the S2 core and agree far
tighter. This is the Rust analogue of Python geometry.area_tolerance_ok, the
primitive that folds the Rust binding into the cross-binding tolerance gate.
Go
Go does not export this function.