NumberSigns

NumberSigns

is an option for NumberForm and related functions which gives strings to use as signs for negative and positive numbers.

Details

  • NumberSigns->{"sneg","spos"} specifies that "sneg" should be given as the sign for negative numbers, and "spos" for positive numbers.
  • The default setting is NumberSigns->{"-",""}. »
  • NumberSigns->{{"snleft","snright"},{"spleft","spright"}} specifies strings to put both on the left and right of numbers to specify their signs. »
  • In AccountingForm, the default setting is NumberSigns->{{"(",")"},""}. »
  • NumberSigns can also be used to specify the strings to assume for number signs with Interpreter["Number",] and other related Interpreters.

Examples

open allclose all

Basic Examples  (4)

Positive and negative numbers with default number signs:

Add explicit positive signs:

Parentheses are used for negative values in AccountingForm:

Interpret numbers with custom decimal signs:

Scope  (3)

Use NumberSigns with PaddedForm:

EngineeringForm:

ScientificForm:

AccountingForm:

Use any strings as number signs:

Wrap positives with square brackets and negatives with parentheses:

Introduced in 1991
 (2.0)
 |
Updated in 2014
 (10.0)