11
$\begingroup$

Sometimes I make a calculation in Mathematica that produces a big number, which Mathematica shows like so:

-1.52522*10^7

This is annoying to me, because I want to see the number normally, without exponential notation, something like this:

-15,252,264.7448716

How can I make Mathematica show the number normally?

$\endgroup$
  • $\begingroup$ Your cross posted, please delete your question SO. $\endgroup$ – Dr. belisarius Apr 28 '13 at 13:15
  • $\begingroup$ @belisarius Done. $\endgroup$ – Ram Rachum Apr 28 '13 at 13:26
  • $\begingroup$ AccountingForm omits the digits after the decimal point, and also uses parentheses for negative numbers which is annoying. $\endgroup$ – Ram Rachum Apr 28 '13 at 13:29
  • $\begingroup$ @Artes AccountingForm shows ugly negative numbers :) $\endgroup$ – Dr. belisarius Apr 28 '13 at 13:30
  • 2
    $\begingroup$ AccountingForm[-15252264.7448716`15, NumberSigns -> {"-", ""}] ? $\endgroup$ – KennyColnago Apr 28 '13 at 15:19
11
$\begingroup$

You may use for example:

pr[n_] := NumberForm[n, Infinity, ExponentFunction -> (Null &)]

so that:

pr[1.52522*10^7]

(* 15252200. *)
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.