A nearby frequency is rejected when the equality fails. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.

highlighted = computed this step

A nearby frequency is still checked exactly

With frequency 4 hertz, the photon energy is 4 joules.

E=hf=14=4 JE=hf=1\cdot 4=4\ \mathrm{J}
Detuned photonNear is not equal in this finite ledger.gap=5 Jh=1 J/Hzf=4 HzE_photon=4 Jmatched=0lowerupper5

The matched bit records the failed equality

The gap remains 5 joules, so the matched bit is 0.

Ephoton=4 J5 J,matched=0E_{photon}=4\ \mathrm{J}\ne 5\ \mathrm{J},\quad matched=0
Rejected photonThe rejected bit is computed, not captioned.gap=5 Jh=1 J/Hzf=4 HzE_photon=4 Jmatched=0lowerupper5