You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trace: a snap's "on a permitted value" test compares raw pairs, while table rows compare values #18
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.
Activity