I would like to print the number represented by 3*10^-9
in non-scientific form: 0.000000003
. How can I do this? NumberForm[N[3*10^-9], {Infinity, 10}]
does not work. Thank you.
Asked
Active
Viewed 331 times
1

Andrew
- 1,499
- 9
- 25
- 37
-
What's your reason for needing to do this? – arshajii Apr 28 '12 at 20:57
-
I need to print these numbers in this form for a text file. – Andrew Apr 28 '12 at 21:01
-
Ah ok I see, well the answer below should work then. – arshajii Apr 28 '12 at 21:10
-
2There are some useful related answers on the new [Mathematica-specific StackExchange site](http://mathematica.stackexchange.com/search?q=NumberForm+AccountingForm&submit=search) – Verbeia Apr 29 '12 at 01:09
2 Answers
4
AccountingForm[3. 10^-9, NumberSigns -> {"-", ""}]
AccountingForm[-3. 10^-9, NumberSigns -> {"-", ""}]
(* 0.000000003 *)
(* -0.000000003 *)

b.gatessucks
- 1,242
- 1
- 15
- 19
-
Thanks, but this does not work so well for me because AccountingForm converts negative signs to parentheses, like an accountant would. – Andrew Apr 28 '12 at 21:23
2
I think that the following way is how you're "supposed" to do it.
NumberForm[N[3*10^-9], ExponentFunction -> (Null &)]
The ExponentFunction option set like this just specifies that you don't want any exponents. (You can also use that option to restrict output to exponents of certain powers.)
(I'm using Mathematica 7.0 .)

Matthew Adams
- 9,426
- 3
- 27
- 43