Description
Append percent to the supplied change and add plus only when change is positive and showPlus is true.
Numeric-looking text has both a value and a written form. Signs, decimal places, exponent markers and trailing zeros can carry display information that ordinary numeric conversion discards; formatting a token does not verify its meaning.
Append percent to the supplied change and add plus only when change is positive and showPlus is true.
When to use this tool
Use Percentage Change Plusminus Style when you need the specified literal representation or text-level numeric diagnostic.
How to use the tool and how it works
- Enter change, showPlus. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read text. Use the output convention below.
Append percent to the supplied change and add plus only when change is positive and showPlus is true.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| change | Already expressed in percent units; not multiplied by 100. | Required. Finite number. |
| showPlus | Show Plus | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| text | Literal formatted output under the stated grammar and display convention. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"change": 12.5,
"showPlus": true
},
"output": {
"text": "+12.5%"
}
} Limitations and assumptions
- Change is an already expressed percentage magnitude, not a raw fraction. The tool does not compute a change from baseline or distinguish percentage points from relative percent.
- 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 a locale-aware or destination-specific formatter when broader parsing and presentation rules are needed. Retain original text when lexical precision matters and validate numeric meaning separately.
References
Similar or alternative tools
- Formatting: Percentage Basis Point Pair Label
Format fraction times 100 with percent and times 10000 with bp, using fixed decimal digits.
- Percentage Negative Zero Display Policy
Detect exact negative-zero spellings, optionally remove only their minus sign, and append percent.