State the integer contract

9007199254740992 and 9007199254740993 are different Python integers. In this original CPU example, math.isclose reports True for that pair even with rel_tol=0 and abs_tol=0. Both values become the same float before the comparison.[5][6]

The task contract is explicit: a candidate must be a built-in Python int equal to the original reference int. Float, bool and string candidates are outside this teaching contract. An approximate floating-point task may legitimately choose a different rule. The issue is which values the chosen predicate actually compares.[5][6]

PEP485 documents the conversion: non-float inputs to math.isclose become floats before the calculation. Zero tolerances do not recover a distinction lost at that boundary. This is documented API behavior, not a Python bug or evidence that an existing benchmark uses the wrong check.[1][2]

Inspect all retained pairs

For the first pair, the exact integer error is 1. On the observed binary64-compatible environment, both converted values have hexadecimal representation 0x1.0000000000000p+53 and integer ratio 9007199254740992 / 1. The saved record exposes the candidate conversion delta of -1 alongside the unchanged original integer.[3][6]

The fixture contains ten deliberately written pairs. Two equal pairs pass both predicates. Four unequal pairs remain distinct after conversion and fail both. Four other unequal pairs collapse to equal floats and pass math.isclose while failing the exact-integer contract. These are chosen examples, not a measured error rate.[5][6]

  • Keep the original values: The one-unit integer error disappears during float conversion. Both tolerances are already zero.

All ten authored pairs from the original Nov 24 CPU run. Powers of two are Python notation; full exact decimal values are in the saved proof.

Reference integerCandidate integerExact errorInteger equalityisclose at zero tolerances
770TrueTrue
781FalseFalse
2**53-12**531FalseFalse
2**532**53+11FalseTrue
2**532**53+22FalseFalse
2**53+42**53+31FalseTrue
-2**53-(2**53+1)1FalseTrue
2**542**54+11FalseTrue
2**53+12**53+10TrueTrue
-2**53-(2**53+2)2FalseFalse
  • Both rel_tol and abs_tol are 0. The declared task requires original built-in integer equality.
  • The four contract disagreements are selected counterexamples, not an error-rate estimate. Two equal controls and four distinct representable controls are retained.

Keep neighboring controls and original values

The neighboring controls matter. 2**53-1 and 2**53 remain distinct, as do the representable values 2**53 and 2**53+2. Another pair rounds upward into its reference. Negative values and a pair above 2**54 expose the same selected loss of distinction. The equal pair at 2**53+1 remains correct under the integer contract even though both floats round: rounding alone is not a task failure.[3][4][5]

Each row retains the exact reference and candidate, integer error, both predicate results, float hexadecimal values, integer ratios and conversion deltas. Large integers are decimal strings in the JSON artifacts and are parsed directly as integers. The table uses powers of two for readability; the proof retains every full decimal value.[5][6]

The program ran once on CPython 3.9.6 on Darwin arm64 on November 24, 2026 UTC. Its float environment matched the preregistered binary64-compatible guard. All ten literal expected case records matched. Six separate selected controls checked the built-in-int contract and decimal-string parser; they are not additional main cases or exhaustive validation.[5][6]

  • Choose the numerical contract: Python integer equality and documented approximate float comparison answer different questions for these inputs.

Choose the numerical contract and preserve credit

For an exact integer task, keep the original integers and compare them without a lossy conversion. If another stage already provides only rounded floats, converting those floats back to integers does not restore the original values. If the task permits approximation, specify that numerical contract separately rather than treating zero tolerance as an exactness guarantee for every input type.[1][4][5]

The MIT download contains the exact executed source, fixture, protocol and complete saved output. Python documentation and Christopher Barker's PEP485 provide the numerical background; Nodus authored the fixture and proof. Packaging and artwork read the retained result without repeating the experiment.[1][2][3][4][5][7]

  • Keep the original value representation and numerical contract with each correctness record.

Sources

  1. PEP485: A Function for testing approximate equality — Christopher Barker; Python contributors peps.python.org
  2. Python math.isclose documentation — Python Software Foundation and Python documentation contributors docs.python.org
  3. Python3.9 Floating Point Arithmetic: Issues and Limitations — Python Software Foundation and Python documentation contributors docs.python.org
  4. Python numeric types — Python Software Foundation and Python documentation contributors docs.python.org
  5. MIT proof and complete saved output data.nodus-compute.ai
  6. Saved result JSON data.nodus-compute.ai
  7. Source and saved-result provenance data.nodus-compute.ai
  8. Vector figure data.nodus-compute.ai