Skip to content

Main content

Forecast Error Quantum Tie Policy Tool

Round a signed forecast error to an explicit quantum with binary64 exact-half detection.

Loading tool…

Description

Divide abs(error) by positive quantum and round to the nearest integer.

Rounding to a quantum chooses a representable multiple. Upward, downward, half-even, and away-from-zero policies differ at boundaries and can change signed residuals.

Divide abs(error) by positive quantum and round to the nearest integer.

When to use this tool

Use Forecast Error Quantum Tie Policy when you need a rounding result under an explicit policy.

How to use the tool and how it works

  1. Enter error, quantum, ties. 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 roundedError, tie. Inspect tie before interpreting the associated values.

Divide abs(error) by positive quantum and round to the nearest integer. At an exact half choose an even integer or a step away from zero according to ties, then restore sign and scale.1

Input fieldMeaning and unitsAccepted input
errorErrorRequired. Finite number.
quantumQuantumRequired. Finite number; strictly above 0.
tiesTiesRequired. Text; one of "even", "away"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
roundedErrorRounded ErrorRequired. Finite number.
tieTieRequired. Boolean.
json
{
  "input": {
    "error": 2.5,
    "quantum": 1,
    "ties": "even"
  },
  "output": {
    "roundedError": 2,
    "tie": true
  }
}

Limitations and assumptions

  • Ties are detected by exact binary arithmetic; decimal-looking halves may not be represented exactly and no tolerance is added.
  • 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 decimal or exact arithmetic when contractual decimal ties or currency rules require it.

References

  1. Calculation and input contract: metrics/forecast-error-quantum-tie-policy — tool.io

Similar or alternative tools