NumberSigns

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

DetailsDetails

  • NumberSigns->{"sneg","spos"} specifies that should be given as the sign for negative numbers, and 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 what to assume for interpretation of numbers with Interpreter["Number",].

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Positive and negative numbers with default number signs:

In[1]:=
Click for copyable input
Out[1]//NumberForm=

Add explicit positive signs:

In[1]:=
Click for copyable input
Out[1]//NumberForm=

Parentheses are used for negative values in AccountingForm:

In[1]:=
Click for copyable input
Out[1]//AccountingForm=
Introduced in 1991
(2.0)
| Updated in 2014
(10.0)