Re: Re: SetAccuracy formatting question
- To: mathgroup at smc.vnet.net
- Subject: [mg67373] Re: [mg67353] Re: [mg67314] SetAccuracy formatting question
- From: Bruce Miller <brucem at wolfram.com>
- Date: Tue, 20 Jun 2006 03:01:34 -0400 (EDT)
- References: <200606180912.FAA03172@smc.vnet.net> <200606190401.AAA21447@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
If one wants to print a number with two digits to the right
of the decimal point, try
In[3]:=
NumberForm[0.001,{3,2}]
Out[3]//NumberForm=
0.00
Using ExponentFunction to get around the 0. 10^-n output is mixing
two different notations.
SetAccuracy generates a zero with 3 digits accuracy, but the default
format for printing such a thing is to say it is approximately zero
in the 3rd digit.
In[1]:=
SetAccuracy[0.001,3]
Out[1]=
-3
0. 10
The internal form of the above output cell is (value first, then the
printed form):
Out[1]=
Cell[OutputFormData["\<\
0``3.\
\>", "\<\
-3
0. 10\
\>"], "Output",
CellLabel->"Out[1]="]
Bruce Miller
Technical Support
Wolfram Research, Inc.
support at wolfram.com
http://support.wolfram.com/
On Jun 18, 2006, at 11:01 PM, Chris Chiasson wrote:
> From reading the help file, it appears the NumberForm function is not
> obeying it's help browser description. Normally, setting the
> ExponentFunction option of NumberForm to Function[Null] makes it print
> every number without scientific notation. That does not work on your
> number. I suggest filing a bug report.
>
> On 6/18/06, kalymereau at yahoo.fr <kalymereau at yahoo.fr> wrote:
>> Hi Group
>>
>> With SetAccuracy[0.5,3] I get 0.50, which is what I want
>>
>> However with SetAccuracy[0.001,3] I get 0 x 10^-3, whereas I would
>> like
>> to get 0.00
>>
>> How to force the result I want ?
>>
>> Thanks !
>>
>>
>
>
> --
> http://chris.chiasson.name/
- References:
- SetAccuracy formatting question
- From: kalymereau@yahoo.fr
- Re: SetAccuracy formatting question
- From: "Chris Chiasson" <chris@chiasson.name>
- SetAccuracy formatting question