Source: https://guthlabs.ai/docs/instruments/depth-of-field-hyperfocal-distance-calculator/implementation/

instrument implementation / implementation-contract

# Depth of Field / Hyperfocal Distance Calculator implementation

A source-bound implementation contract for Depth of Field / Hyperfocal Distance Calculator; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t4-169

**Effect**: Computation or source lookup only

## Input and validation requirements

The formulas have an undefined far-limit denominator at s=H+f, and applying the raw far formula beyond that switch produces a negative nonphysical distance. The instrument must explicitly handle the infinity branch and reject or label the division-by-zero boundary.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "sensor_format": "full-frame",
    "focal_length_mm": 50,
    "aperture_f_number": 2.8,
    "circle_of_confusion_mm": 0.03,
    "focus_distance_mm": 5000
  },
  "expected_outputs": {
    "hyperfocal_distance_mm": 29811.904762,
    "near_limit_mm": 4288.013699,
    "far_limit_mm": 5995.498947,
    "total_depth_of_field_mm": 1707.485248
  },
  "working": "H = f²/(N·c) + f = 50²/(2.8·0.03) + 50 = 2500/0.084 + 50 = 29761.904762 + 50 = 29811.904762 mm. Near = (H·s)/(H + (s-f)) = (29811.904762·5000)/(29811.904762 + 4950) = 149059523.81/34761.904762 = 4288.013699 mm. Far = (H·s)/(H - (s-f)) = (29811.904762·5000)/(29811.904762 - 4950) = 149059523.81/24861.904762 = 5995.498947 mm. Total DoF = far - near = 5995.498947 - 4288.013699 = 1707.485248 mm."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/depth-of-field-hyperfocal-distance-calculator/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/depth-of-field-hyperfocal-distance-calculator/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/depth-of-field-hyperfocal-distance-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche4/tranche4-results.json`
