3
$\begingroup$

Possible Duplicate:
Way to improve “show me this decimal number to M places, don't use scientific notation”?

How can I expand e.g. number 1.*10^-8 so that there would be no exponents? It should look like 0.00000001.

$\endgroup$

marked as duplicate by Mr.Wizard Sep 15 '12 at 11:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3
$\begingroup$

Representation of numbers of handled with NumberForm. Choice of exponent to display is determined by its ExponentFunction option. If you never want an exponent displayed, this option should be a function that always returns Null, i.e. (Null &):

NumberForm[1.*10^-8, ExponentFunction -> (Null &)]
(* 0.00000001 *)
$\endgroup$
  • $\begingroup$ Thank you! I was thinking that NumberForm might be the answer but I did not know how exactly do it. $\endgroup$ – Teemu Sep 15 '12 at 7:55
  • $\begingroup$ What if you always want to show the exponent? I am having problems transforming some numbers so that they show the exponents instead of the full number as in your output :\ applying only NumberForm[300000000,2] doesn't help. $\endgroup$ – Sosi Dec 3 '15 at 17:23
0
$\begingroup$

In addition to NumberForm, AccountingForm may be a useful shorthand:

AccountingForm[1.*10^-8]

0.00000001

Negative numbers are displayed (by default) in parentheses:

AccountingForm[-1.*10^-8]

(0.00000001)

$\endgroup$

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