HYSTERESIS(1)resurrection.fun manualHYSTERESIS(1)

hysteresis

hysteresis(1) — the manual page

Name

hysteresis — hysteresis — return a value that depends on how you got here, not where you are

Synopsis

hysteresis [--deadband=WIDTH] [--coerce] [--remanent] INPUT
output(now) = f(input(now), path taken to get here)

Description

hysteresis wraps an input so that its output lags behind it and depends on the direction of approach. The same input read twice returns two different values if the two readings were reached from opposite sides. There is no bug here. The value is doing exactly what the state it remembers tells it to.

Two thresholds are maintained rather than one: a level to turn on and a lower level to turn off. Between them lies the deadband, a region in which hysteresis returns its previous answer and ignores you. This is the point of it. A system with a single threshold chatters; a system with two commits.

The stored state persists after the input that set it is withdrawn. Remove the field, the alignment stays. Stop pulling, the position holds. This retained answer is called remanence, and clearing it costs more than setting it did.

Options

--deadband=WIDTH
Set the gap in which small changes of heart are discarded. Wider is calmer. Zero produces a system that flutters forever at the threshold and is called honest.
--coerce
Force a flip below the coercive threshold. Logged. The domain will remember who made it.
--remanent
Retain the last state after the input is gone. Default. There is no --forget.
--tug
Apply input inside the slack. Registered, counted, declined. Accepted for the comfort of the caller.
--saturate
Drive every element into agreement. Further input past this point does nothing and is billed as heat.
--linear
Pretend output tracks input with no lag. Silently ignored. Reality jitters; this flag does not.

Exit Status

0
output changed; the input crossed a threshold and the state moved
0
output unchanged; the input stayed inside the deadband, as designed
17
input withdrawn, output retained (remanence); this is not a leak
42
saturated; all further input dissipated as heat in the loop

History

"From Greek hysterēsis, 'a shortcoming' or 'a coming after,' from hysteros, 'later, behind' — unrelated to hysteria despite the shared look. Sir James Alfred Ewing gave the word its technical sense around 1885 while studying iron that stayed magnetized after the field was removed. The area enclosed by the resulting magnetization loop is not a metaphor: it is energy dissipated as heat on every cycle, which is why transformer cores are built to keep that loop thin."

Bugs

Setting a value is cheap; unsetting it is not. Coercivity is charged at the higher rate.

The system counts every tug it ignored and will report the total on request. Requests are discouraged.

There is no way to read the current output without also becoming part of its history.

See Also

backpressure(3), idempotent(3), quiescence(1). The living exhibit demonstrates the word in motion:

▸ operate hysteresis

Author

"Maintained jointly by The Mule, who moves only when the rope is taut and holds no grudges, and Magneto, an iron core who keeps every field he has ever felt. Neither could be reached for comment; The Mule declined, and Magneto had already made up his mind."

resurrection.fun2026-07-17HYSTERESIS(1)