Dollar Figure Style

Validate dollar-figure grouping and decimal precision.

Description

Dollar-figure style constructs a fixed-decimal, grouped numeric rendering with a dollar prefix.

Dollar-figure style constructs a fixed-decimal, grouped numeric rendering with a dollar prefix. The check compares that rendering exactly.1

Validate dollar-figure grouping and decimal precision.

When to use Dollar Figure Style

Use this tool to validate dollar-figure grouping and decimal precision.

Prepare the text, recorded observations, aligned figures or editorial criteria requested. Confirm what each label, count, timestamp or supplied flag represents before interpreting the result.

How to use Dollar Figure Style and understand its results

  1. Prepare the text, recorded observations, aligned figures or editorial criteria requested. Confirm what each label, count, timestamp or supplied flag represents before interpreting the result.
  2. Enter amount, decimalPlaces, renderedAmount using the field table and calculation rules, then run the tool.
  3. Read expectedAmount, matchesExpected. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
amountDollar amountnumberRequired
decimalPlacesDecimal placesinteger; minimum: 0; maximum: 6Required
renderedAmountRendered amountstringRequired

Enter finite amount, integer decimal places 0–6, and rendering. Format using en-US minimum/maximum fraction digits, prepend $, trim the rendering and compare exactly. A negative amount is rendered with $ before the minus sign.

expected="$"+en-US formatted amount

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
expectedAmountExpected dollar figurestring
matchesExpectedMatches expected amountboolean
json
{
  "input": {
    "amount": 1234.5,
    "decimalPlaces": 2,
    "renderedAmount": "$1,234.50"
  },
  "output": {
    "expectedAmount": "$1,234.50",
    "matchesExpected": true
  }
}

Limitations and assumptions

No exchange rate, dollar currency identity or publication-specific style is determined.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use Percent Range Style: Validate percentage-range punctuation and repeated percent signs. For a complementary task, use Temperature Style: Validate a rendered temperature against supplied unit and degree-symbol policy.

References

  1. Dollar Figure Style — tool.io

Similar or alternative tools

  • Percent Range Style

    Validate percentage-range punctuation and repeated percent signs.

  • Temperature Style

    Validate a rendered temperature against supplied unit and degree-symbol policy.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies