Description
Decompose a signed sequence index into floor quotient and nonnegative within-period phase, retaining negative cycle numbers.
A sequence rule specifies an index origin, state order, and relation among terms. Advancing one step, mapping an index, and checking a local residual answer different questions. Supplied coefficients or periods define a model; they do not establish that observations follow it.
Decompose a signed sequence index into floor quotient and nonnegative within-period phase, retaining negative cycle numbers.
When to use this tool
Use Sequence: Periodic Index Quotient Remainder 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 index, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Return cycle=floor(index/period) and nonnegative modular phase inside result. Require index within plus or minus one billion and period one through one billion.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| index | Zero-based index unless the mechanics explicitly state otherwise. | Required. Safe integer. |
| period | Period | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
{
"input": {
"index": -1,
"period": 4
},
"output": {
"result": {
"cycle": -1,
"phase": 3
}
}
} Limitations and assumptions
- Negative indices use floor rather than truncation toward zero. The period and origin are supplied, not inferred from data or a calendar.
- Outputs are nested inside result. 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
- Periodic Interleaving Phase Source Index
Return stream=globalIndex%streams and sourceIndex=floor(globalIndex/streams) for nonnegative integer global index and positive stream count.
- Period Prefix Remainder
Return fullPeriods=floor(prefixLength/periodLength) and remainder=prefixLength%periodLength for nonnegative integer prefix length and positive integer period length.