Skip to content

Main content

Old Currency Subunit Remainder Tool

Decompose nonnegative supplied historical subunits under an explicit radix without a currency dataset.

Loading tool…

Description

Parse exact decimal subunits and perMajor with subunits >= 0 and perMajor > 0.

Historical monetary and physical units can have local or period-specific conversion bases. Exact subunit arithmetic and supplied mass factors preserve a declared interpretation but do not select the correct historical system automatically.

Parse exact decimal subunits and perMajor with subunits >= 0 and perMajor > 0.

When to use this tool

Use Old Currency Subunit Remainder when applying an explicit historical unit or subunit convention.

How to use the tool and how it works

  1. Enter subunits, perMajor. 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 majorDecimal, remainderDecimal. Use the output convention below.

Parse exact decimal subunits and perMajor with subunits >= 0 and perMajor > 0. Return whole majorDecimal quotient and remainderDecimal using integer division and remainder, both as exact decimal text.1

Input fieldMeaning and unitsAccepted input
subunitsSubunitsRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
perMajorPer MajorRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
Output fieldInterpretationReturned shape
majorDecimalMajor DecimalRequired. Text; maximum UTF-16 length 8192.
remainderDecimalRemainder DecimalRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "subunits": "245",
    "perMajor": "12"
  },
  "output": {
    "majorDecimal": "20",
    "remainderDecimal": "5"
  }
}

Limitations and assumptions

  • This avoids floating-point conversion and does not return fractional major units. The conversion base is supplied and no historical currency system 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.

Alternative or Complementary methods

Consult the source’s place, date and commodity or currency context before choosing conversion factors.

References

  1. Calculation and input contract: economic-history/old-currency-subunit-remainder — tool.io

Similar or alternative tools