Skip to content

Main content

Phase Cycle Index Offset Tool

Calculate phase cycle index offset from explicit caller-supplied inputs.

Loading tool…

Description

Shift a cycle/phase coordinate with exact integer intermediates.

Conversion direction matters for reciprocal and logarithmic quantities. Frequencies, periods, phase coordinates and reference ratios use explicit origins, sign policies and denominator units, rather than a single ordinary length or time multiplier.

Shift a cycle/phase coordinate with exact integer intermediates.

When to use this tool

Use Phase Cycle Index Offset when converting the stated reciprocal, angular, phase or logarithmic convention.

How to use the tool and how it works

  1. Enter cycleIndex, offset, phasesPerCycle, phaseIndex. 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 shiftedCycleDecimal, shiftedPhase. Use the output convention below.

Shift a cycle/phase coordinate with exact integer intermediates. Require positive whole phasesPerCycle and phaseIndex in [0,period); combine cycle*period+phase+offset using BigInt, then return floor-style cycle quotient as decimal text and nonnegative phase.1

Input fieldMeaning and unitsAccepted input
cycleIndexCycle IndexRequired. Safe integer.
offsetOffsetRequired. Safe integer.
phasesPerCyclePhases Per CycleRequired. Safe integer; minimum 1.
phaseIndexPhase IndexRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
shiftedCycleDecimalExact signed decimal cycle quotient using floor-style division.Required. Text; maximum UTF-16 length 8192.
shiftedPhaseNonnegative remainder below phasesPerCycle.Required. Safe integer.
json
{
  "input": {
    "cycleIndex": 2,
    "offset": 3,
    "phasesPerCycle": 4,
    "phaseIndex": 2
  },
  "output": {
    "shiftedCycleDecimal": "3",
    "shiftedPhase": 1
  }
}

Limitations and assumptions

  • Numeric inputs still obey their contracts; cycle output is exact text and no calendar or physical period is inferred.
  • 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 the complete unit and origin definitions, and distinguish a coordinate conversion from a density Jacobian or a physical measurement.

References

  1. Calculation and input contract: convert/phase-cycle-index-offset — tool.io

Similar or alternative tools