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
- Enter subunits, perMajor. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| subunits | Subunits | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| perMajor | Per Major | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| majorDecimal | Major Decimal | Required. Text; maximum UTF-16 length 8192. |
| remainderDecimal | Remainder Decimal | Required. Text; maximum UTF-16 length 8192. |
{
"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
Similar or alternative tools
- Predecimal Coin Account Value Token
minorTotal = (major*middlePerMajor+middle)*minorPerMiddle+minor; majorEquivalent sums the corresponding fractional major units.
- Archival Currency Accounting Unit Tag Tool
Preserve an explicit archival currency transcription and accounting-unit source without exchange-rate or subunit inference.