1
$\begingroup$

I would like to print 1 as 1.00x10^0 by using ScientificForm/PaddedForm. I've tried with

ScientificForm[{N@Sqrt[2]*1*^2, N@\[Pi], 1}, 3, NumberFormat -> (Row@{PaddedForm[#1, {2, 2}], "\[Times]", 
  Superscript["10", ToString[#3]]} &)]

but I've missed both the exponent (the zero) and the right padding zeros.

Can someone help me? Thanks, Fabio

$\endgroup$
  • $\begingroup$ Try this PaddedForm[ {N@Sqrt[2]*1*^2, N@\[Pi], 1.0}, {3, 2}, ExponentFunction -> (1 Quotient[#, 1] &), NumberFormat -> (Row@{#1, "\[Times]", Superscript["10", ToString[#3]]} &) ] $\endgroup$ – N.J.Evans Oct 12 '15 at 19:18
2
$\begingroup$

N.J.Evans answer in comments:

PaddedForm[{N@Sqrt[2]*1*^2, N@π, 1.0}, {3, 2}, 
 ExponentFunction -> (1 Quotient[#, 1] &), 
 NumberFormat -> (Row@{#1, "×", 
      Superscript["10", ToString[#3]]} &)]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Thank you very much, tricky though simple! $\endgroup$ – Fabio Oct 13 '15 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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