Skip to content

ltm: skipped link-score slot reports 0 where the target is NaN #1022

Closed as not planned

Description

@bpowers

A per-element link score skips building the equation for a target element that does not read the source at all, and stores 0 there (#977).
When that target element's value is NaN or infinite, the equation it replaces would have produced NaN, so the skip turns a NaN into 0.
This is a semantics decision: which should the score report?

Example

zed            stock, no flows, initial 0
nan_src        = zed / zed                 -- NaN at run time
growth[boston] = nan_src * 0.02

The boston slot of the pop[nyc] -> growth link score (boston does not read pop):

boston slot
equation built 0, NaN, NaN, NaN, NaN, NaN
skipped (today) 0, 0, 0, 0, 0, 0

The built equation gives NaN only because its own NaN - PREVIOUS(NaN) is NaN and its divide-by-zero guard does not catch NaN.

The two positions

For 0: the NaN is made by the link-score equation, not by the modeler, and on a slot with no dependence on the source 0 is the known answer.
The target's own series stays NaN, and every link score that does read it still reports NaN, so the signal is not lost.

For NaN: relative loop scores already treat a NaN score as meaningful.
ltm_post leaves NaN entries out of the partition total so healthy siblings normalize cleanly while the bad entry stays NaN as an "undefined here" signal (#542).

Building every such slot whenever finiteness is not guaranteed means giving up the skip entirely (about 4,300 slots and 19% of C-LEARN's flow program).

Recommendation

Keep 0 and say so in the docs: no dependence is a stronger fact than an undefined target, and only models already producing NaN are affected.

Pointers

Activity

  1. added
    ltm
    on Aug 10, 2026
  2. changed the title [-]ltm: an omitted link-score arm reports 0 where the materialized arm reported NaN -- which is right?[/-] [+]ltm: skipped link-score slot reports 0 where the target is NaN[/+] on Oct 12, 2026
  3. added
    question
    wontfix
    and removed
    question
    on Oct 12, 2026
  4. bpowers commented on Oct 12, 2026

    @bpowers
    OwnerAuthor

    Closing as won't fix.

    Recommend keeping 0 and documenting it: the slot has no dependence on the source, the NaN still shows on the target and on every link that reads it, and only models already producing NaN are affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ltmwontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions