|
[Date Index]
[Thread Index]
[Author Index]
Re: Setting precision in binary digits?
- To: mathgroup at smc.vnet.net
- Subject: [mg9002] Re: Setting precision in binary digits?
- From: Robert Knapp <rknapp>
- Date: Tue, 7 Oct 1997 03:35:50 -0400
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
Fergal Shevlin wrote:
>
> Hello,
>
> I would like to specify the precision of my numbers in binary digits
> rather than decimal digits. Is there any way of doing this?
>
The precision of numbers is kept in Mathematica as a real quantity.
This
means that you can easily specify a precision in binary digits by
multiplying
by Log[10.,2.]. For example
In[1]:= InputForm[SetPrecision[1/7,20*Log[10.,2.]]]
Out[1]//InputForm= 0.142857142857142849`6.0206
In[2]:= 6.0206*Log[2.,10.]
Out[2]= 20.
The InputForm gives you the fractional (with repect to base 10)
precision,
If you use the command Precision, this is rounded to the nearest
integer,
so the conversion won't appear quite correctly. In the next version of
Mathematica there will be options that allow you to prevent this
rounding.
Rob Knapp
Wolfram Research
Prev by Date:
Problems installing Mathematica 3.01 on AIX
Next by Date:
Loading packages in Ver 3.01
Previous by thread:
Re: Setting precision in binary digits?
Next by thread:
Parsing polygon lists
|