Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Precision of a number raised to a power

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73511] Re: Precision of a number raised to a power
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Wed, 21 Feb 2007 01:36:26 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <erelt5$7np$1@smc.vnet.net>

Sonya wrote:
> Hallo
> I am new to Mathematica and I am thankful to any help regarding the following.
> If I have something like a^b . The a is any arbitrary decimal number (let us say of precision double) the b are numbers from 1-10 (exact numbers without a point). 
> What will be the precision of the above expression after raising a to the powers from 1-10.
> 
> Many thanks in advance
> Sonya
> 

Hi Sonya,

The precision of the results does not change: since you have a mix of 
hardware precision numbers and exact numbers the overall precision is 
lowered to machine precision and the computations are done using the 
functions implemented in the hardware. Detailed explanations are given 
in
"The Mathematica Book Online / Advanced Mathematics in Mathematica / 
Numbers / 3.1.4 Numerical Precision", available at

http://documents.wolfram.com/mathematica/book/section-3.1.4

To see the precision of a Mathematica expression, you can use the 
built-in function Precision [1]. For instance,

In[1]:=
a = 2.;

In[2]:=
Precision[a]

Out[2]=
MachinePrecision

In[3]:=
b = Range[10]

Out[3]=
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

In[4]:=
Precision /@ b

Out[4]=
{Infinity, Infinity, Infinity, Infinity, Infinity,

   Infinity, Infinity, Infinity, Infinity, Infinity}

In[5]:=
a^b

Out[5]=
{2., 4., 8., 16., 32., 64., 128., 256., 512., 1024.}

In[6]:=
Precision /@ %

Out[6]=
{MachinePrecision, MachinePrecision, MachinePrecision,

   MachinePrecision, MachinePrecision,

   MachinePrecision, MachinePrecision,

   MachinePrecision, MachinePrecision, MachinePrecision}

In[7]:=
$MachinePrecision

Out[7]=
15.9546

In[8]:=
$Version

Out[8]=
5.2 for Microsoft Windows (June 20, 2005)

Regards,
Jean-Marc

[1] http://documents.wolfram.com/mathematica/functions/Precision


  • Prev by Date: Approximate/asymptotic factorization
  • Next by Date: Re: Mathematica precision for a^b
  • Previous by thread: Re: Precision of a number raised to a power
  • Next by thread: Precision issues