AccountingForm
AccountingForm[expr]
prints with all numbers in expr given in standard accounting notation.
AccountingForm[expr,n]
prints with numbers given to n‐digit precision.
Details and Options
- AccountingForm never uses scientific notation.
- AccountingForm uses parentheses to indicate negative numbers.
- The following options can be given:
-
DigitBlock Infinity number of digits between breaks ExponentFunction Automatic function to apply to exponents ExponentStep 1 steps by which exponents can increase NumberFormat Automatic function used to assemble mantissa, base, and exponent NumberMultiplier "×" string to use to indicate multiplication NumberPadding {"",""} strings to use for left and right padding NumberPoint "." decimal point string NumberSeparator {","," "} string to insert at breaks between blocks NumberSigns {{"(",")"},""} strings to use for signs of negative and positive numbers SignPadding False whether to insert padding after the sign - The typeset form of AccountingForm[expr] is interpreted the same as expr when used in input. »
- When an input evaluates to AccountingForm[expr], AccountingForm does not appear in the output. »
Examples
open allclose allScope (5)
Options (10)
DigitBlock (2)
ExponentFunction (1)
NumberFormat (1)
NumberSigns (1)
Properties & Relations (4)
AccountingForm does not have exponents:
NumberForm and PaddedForm have exponents for powers greater than 5:
ScientificForm has a single digit to the left of the decimal:
EngineeringForm uses exponents that are multiples of 3:
Affect the display of numbers in TableForm or MatrixForm:
The typeset form of AccountingForm[expr] is interpreted the same as expr when used in input:
Copy the output and paste it into an input cell. The (2) is interpreted as -2:
When an input evaluates to AccountingForm[expr], AccountingForm does not appear in the output:
Out is assigned the value 1.`*^7, not AccountingForm[10.^7]:
Possible Issues (2)
Placeholder zeros may be needed if the requested precision is small:
Even when an output omits AccountingForm from the top level, it is not stripped from subexpressions:
The output does not have AccountingForm in it:
However, the variable e does have AccountingForm in it, which may affect subsequent evaluations:
The product is not evaluated due to the intervening AccountingForm:
Assign variables first and then apply AccountingForm to the result to maintain computability:
Text
Wolfram Research (1991), AccountingForm, Wolfram Language function, https://reference.wolfram.com/language/ref/AccountingForm.html (updated 2017).
CMS
Wolfram Language. 1991. "AccountingForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/AccountingForm.html.
APA
Wolfram Language. (1991). AccountingForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AccountingForm.html