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:

Wolfram Research (1991), NumberSigns, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberSigns.html (updated 2014).

Text

Wolfram Research (1991), NumberSigns, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberSigns.html (updated 2014).

CMS

Wolfram Language. 1991. "NumberSigns." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/NumberSigns.html.

APA

Wolfram Language. (1991). NumberSigns. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberSigns.html

BibTeX

@misc{reference.wolfram_2024_numbersigns, author="Wolfram Research", title="{NumberSigns}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/NumberSigns.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_numbersigns, organization={Wolfram Research}, title={NumberSigns}, year={2014}, url={https://reference.wolfram.com/language/ref/NumberSigns.html}, note=[Accessed: 22-November-2024 ]}