2
$\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$
1
  • $\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, 2015 at 19:18

1 Answer 1

3
$\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$
1
  • $\begingroup$ Thank you very much, tricky though simple! $\endgroup$
    – Fabio
    Oct 13, 2015 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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