1
$\begingroup$

How can I change this function:

nFormat=NumberForm[#,{\[Infinity],2},NumberPoint->",",NumberSeparator->".",DigitBlock->3,ExponentStep->10]&;

So when I use it like:

nFormat/@{10.01,10.1,0.1}//Column

10,01

10,10

1.000.000.000,00*10^(-10)

The last number 1.000.000.000,00*10^(-10) get the format equals to 0.10?

$\endgroup$
1
  • 1
    $\begingroup$ Setting ExponentStep to 2 gives a result You want, but I'm not sure if it is what You're looking for $\endgroup$
    – Wojciech
    Dec 3 '13 at 15:12
6
$\begingroup$

See last paragraph in Scope:-

http://reference.wolfram.com/mathematica/ref/ExponentFunction.html

nFormat = NumberForm[#, {\[Infinity], 2},
    NumberPoint -> ",", NumberSeparator -> ".", DigitBlock -> 3, 
    ExponentFunction -> (Null &)] &;
$\endgroup$
1
  • $\begingroup$ Excellent! It's what I need. tks $\endgroup$
    – Murta
    Dec 3 '13 at 17:48

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.