Skip to content

Main content

Microbial Diary Counter Reset Gap Tool

One explicitly indicated wrapping event-counter increment, not inferred organism growth or an implicit reset detection rule.

Loading tool…

Description

Without resetOccurred, require current ≥ previous and subtract.

A cumulative counter can increase, wrap, or restart. The difference between two readings is meaningful only under an explicit rollover or reset model and compatible time units.

Without resetOccurred, require current ≥ previous and subtract.

When to use this tool

Use Microbial Diary Counter Reset Gap when you need a supplied counter difference or rate convention.

How to use the tool and how it works

  1. Enter previous, current, counterModulus, resetOccurred. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read increment. Use the output convention below.

Without resetOccurred, require current ≥ previous and subtract. With resetOccurred, use counterModulus - previous + current.1

Input fieldMeaning and unitsAccepted input
previousPreviousRequired. Safe integer; minimum 0.
currentCurrentRequired. Safe integer; minimum 0.
counterModulusCounter ModulusRequired. Safe integer; minimum 1.
resetOccurredReset OccurredRequired. Boolean.
Output fieldInterpretationReturned shape
incrementIncrementRequired. Safe integer.
json
{
  "input": {
    "previous": 90,
    "current": 10,
    "counterModulus": 100,
    "resetOccurred": true
  },
  "output": {
    "increment": 20
  }
}

Limitations and assumptions

  • The flag means one modular rollover in this formula, not an arbitrary reset to zero; multiple wraps cannot be recovered.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use reset events, wrap epochs, and monotonic timestamps to resolve ambiguous counter histories.

References

  1. Calculation and input contract: microbiology/microbial-diary-counter-reset-gap — tool.io

Similar or alternative tools