Description
Classify one three-term second difference under an explicit tolerance policy, reusing the finite-difference weight primitive with centered observations.
For three equally spaced sequence values, the second difference compares two consecutive first differences. A positive result means the later increment is larger; a negative result means it is smaller. An absolute tolerance controls when a small difference is treated as zero.
Classify one three-term second difference under an explicit tolerance policy, reusing the finite-difference weight primitive with centered observations.
When to use this tool
Use Second Difference Sign when you need this particular index map, recurrence step, count, or local algebraic term under supplied sequence conventions.
How to use the tool and how it works
- Enter first, second, third, tolerance, equalityWithinTolerance. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sign, difference. Use the output convention below.
Delegate order-two binomial weights and compute difference=first-2*second+third through centered terms. Return sign zero within tolerance using the selected inclusive or strict boundary; exact zero always has sign zero.1
The binomial difference coefficients are obtained from the linked exact integer weight operation before this second-difference calculation.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First value on the equally spaced grid, in the common value unit. | Required. Finite number. |
| second | Middle value on the equally spaced grid, in the common value unit. | Required. Finite number. |
| third | Third value on the equally spaced grid, in the common value unit. | Required. Finite number. |
| tolerance | Absolute second-difference tolerance in value units; no step-squared division. | Required. Finite number; minimum 0. |
| equalityWithinTolerance | Include the tolerance boundary when true; use a strict boundary when false. Exact zero always yields sign zero. | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sign | −1 for negative, 0 within the selected tolerance rule, or 1 for positive. | Required. Safe integer. |
| difference | first − 2 × second + third, in the input value unit. | Required. Finite number. |
{
"input": {
"first": 1,
"second": 2,
"third": 4,
"tolerance": 0,
"equalityWithinTolerance": true
},
"output": {
"sign": 1,
"difference": 1
}
} Limitations and assumptions
- Values must lie on an appropriate equally spaced grid for a second-difference interpretation. This is not divided by step squared, and tolerance is an absolute value-unit bound rather than statistical significance.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
- 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. Signed zero is exported as zero.
Alternative or Complementary methods
Choose exact integer arithmetic when the index or coefficient range requires it. A complete sequence analysis needs actual terms and a consistent index and state-order convention beyond one local step.
References
Similar or alternative tools
- Second Difference One Quadratic Term
Return secondDifference=2*coefficient*step².
- Second Order Recurrence State Determinant
Return determinant=previous*next-current² for three supplied terms.