Advertisement
Data Processing

SmartDataAI Lab Notes: Lens Powers — The Dropped Sign

The migration report was perfect, and that was the problem. Our register of twelve lens powers was spelled five ways and read back in full: 48 of 60 r...

The migration report was perfect, and that was the problem. Our register of twelve lens powers was spelled five ways and read back in full: 48 of 60 records filed exactly, none were refused, and every value in the migrated register was a real, orderable lens power. It was also wrong about half the stock. Every negative power — the diverging lenses prescribed for short sight — had, in two of its five spellings, become its positive twin: the converging lens for long sight, the opposite device. No parser complained, because nothing was malformed. The sign had not been corrupted in transit; it had never been written down, and a register cannot refuse a value that looks exactly like a lens it stocks.

What The Dropped Sign means

The Dropped Sign is the failure of a signed quantity stored in an unsigned spelling: the magnitude survives intact, the direction vanishes, and because the register contains both directions, the orphaned magnitude files under the wrong one with full confidence. The nearest earlier group in this series, The Vanishing Plus (AN124), met the same erasure in a banded scale, where "the sign-stripped form merges every signed band into its base letter" and the damage concentrated at the top of the scale. Here the geometry is simpler and crueller. The register is symmetric — six negative powers against their six positive twins — so a dropped sign does not blur a value or push it to a boundary; it exchanges it, one for one, for the opposite prescription. A −6.00 lens and a +6.00 lens share every digit. Only the sign knows which eye, and which condition, the lens is for.

SmartDataAI Lab Notes: Lens Powers — The Dropped Sign

The pre-migration inventory

The register holds twelve powers: −6.00, −4.00, −3.00, −2.00, −1.00, −0.50, +0.50, +1.00, +2.00, +3.00, +4.00 and +6.00 dioptres, where the focal length in metres is exactly the reciprocal of the power. Each power was spelled five ways: the signed label at two decimals ("−2.00 D"); the magnitude with the sign dropped ("2.00"); the signed focal length in metres at three decimals ("−0.500"); the signed focal length in whole centimetres ("−50"); and the unsigned focal length in whole millimetres ("500"). Focal readings invert and file under the nearest register power within a quarter dioptre. The inventory by form:

Written formExactMergedRefused
Signed power label1200
Magnitude, sign dropped660
Focal length, metres, signed1200
Focal length, centimetres, signed1200
Focal length, millimetres, unsigned660

Read the zeros in the last column first: across sixty records, no spelling was ever refused. Every focal length, even rounded to whole centimetres — where −6.00 D becomes "−17" and inverts to −5.88, still inside tolerance — found its home. The register's only failure mode is the exchange, and it belongs entirely to the two spellings that cannot write a minus sign.

The worked example: a −2.00 lens in five records

Trace one stock lens, −2.00 D, the commonest short-sight prescription in the set. Its signed label files exactly. Its focal length in metres, "−0.500", inverts to −2.00: exact. In centimetres, "−50": exact again. But its magnitude, "2.00", is read as a positive power and files under +2.00 D; and its focal length written unsigned in millimetres, "500", inverts to +2.00 and files the same way. Two of the five records describe a lens that corrects the opposite condition. Multiply by the register: all six negative powers make the same journey in both unsigned forms — −6.00 arriving as +6.00, −0.50 as +0.50 — twelve merged records, each indistinguishable from truth, each attached to a product a customer can order.

The switch: steps and timing

Migrate in this order. Step one: freeze the unsigned fields — magnitude and unsigned focal millimetres stop accepting writes immediately, because every day they remain writable adds records whose signs are unrecoverable. Step two: re-express every legacy record in a signed spelling at the point of migration, sourcing the sign from the one place it still exists — the original prescription, order or clinical record the register was built from; where no source survives, the record is quarantined rather than guessed, since a guessed sign is a coin flip dispensed as fact. Step three: cut reads over to the signed fields only after the re-expression passes the harness test — all sixty records, five spellings, with the two unsigned forms retired from the spelling set rather than merely discouraged. Timing follows the risk: the freeze is immediate, the re-expression is the long pole, and the cut-over waits for it, because a fast migration that carries unsigned data forward has simply moved the loss to a newer system.

The parallel run, and the rollback that must exist

Run old and new registers in parallel for one full ordering cycle, comparing not counts but identities: for each lens, the multiset of powers the two registers report should match exactly, and any record whose power differs only in sign is flagged for source verification rather than averaged away. The rollback plan rests on one uncomfortable fact — the sign, once dropped, cannot be reconstructed from the register itself, because the register is symmetric and both twins are legitimate. Rollback therefore means restoring the pre-migration snapshot and the source documents, not repairing the migrated data; a migration of signed quantities that has no snapshot has no rollback, only an apology. Keep the snapshot until the parallel run closes clean, and keep the source prescriptions longer than that.

FAQ

Why did the centimetre form survive rounding but the millimetre form fail? The centimetre spelling kept its sign; its rounding error — at worst 0.12 dioptres at the strong end — stayed inside the quarter-dioptre tolerance. The millimetre spelling was numerically finer and informationally poorer: it dropped the sign, and no precision in the digits compensates for a missing direction.

Is a focal length ever legitimately unsigned? In catalogues, often — a focal length quoted as a length, for a lens whose type is stated elsewhere. That is precisely the trap: the sign lives in the surrounding prose, and any extraction that lifts the number without the prose performs the drop this article measures.

Why are there no refusals at all in this register? Because every spelling of every power lands within tolerance of some register power. Symmetric registers with reciprocal forms are maximally hospitable to wrong values; a refusal requires a value with no home, and here every value has two.

Which single change removes the most damage? Signing the millimetre form. The magnitude form's loss is obvious to a human reader; the unsigned focal length looks like a specification, travels furthest into other systems, and carries six of the twelve merges by itself.

The red line

Never let a signed quantity cross a system boundary in an unsigned field — not as a magnitude, not as an unsigned length, not "temporarily". The receiving register will not reject the value, the migration report will not flag it, and the first evidence of the loss will be a customer holding the opposite lens: on a symmetric register, a dropped sign is not missing data, it is wrong data with perfect paperwork.

Source: SmartDataAI measurement harness, batch 52 (group AN165) — powers, reciprocal focal lengths, spellings and outcome counts as recorded in this batch's SD run notes; the register was fixed from the definition of the dioptre, focal length in metres being the reciprocal of power.

Know someone who needs this? Share it.

Advertisement