What is inconsistent
To decide whether a value sits on a row or between two, a trace compares two bounds written as numerator/denominator pairs. With #12, a lookup's segment and a missed lookup's covered range compare them by value, through detail::same_declared_bound in include/formula-cpp/trace_render.hpp, so 2/4 and 1/2 are one row. A snap's "on a permitted value" test does not. snap_suffix (around trace_render.hpp:2164) compares the raw pairs:
if (neighbours.low == neighbours.high)
So two neighbours equal in value but stored as different pairs read as two neighbours, not "on a permitted value".
Expected
Do one of these:
- If a snap's permitted values can hold the same value as two different pairs, compare by value, as table rows do, using
same_declared_bound.
- If they cannot (if the permitted set is validated as strictly ascending by value where it is declared), say so in a comment at that comparison, so the difference from the table rows reads as intended.
Also
lookup_miss_text spells lowText before it branches, and the two-row path never uses it. Spell it only where it is used.
What is inconsistent
To decide whether a value sits on a row or between two, a trace compares two bounds written as numerator/denominator pairs. With #12, a lookup's segment and a missed lookup's covered range compare them by value, through
detail::same_declared_boundininclude/formula-cpp/trace_render.hpp, so2/4and1/2are one row. A snap's "on a permitted value" test does not.snap_suffix(aroundtrace_render.hpp:2164) compares the raw pairs:if (neighbours.low == neighbours.high)So two neighbours equal in value but stored as different pairs read as two neighbours, not "on a permitted value".
Expected
Do one of these:
same_declared_bound.Also
lookup_miss_textspellslowTextbefore it branches, and the two-row path never uses it. Spell it only where it is used.