       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.
>
> 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 . For instance,

In:=
a = 2.;

In:=
Precision[a]

Out=
MachinePrecision

In:=
b = Range

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

In:=
Precision /@ b

Out=
{Infinity, Infinity, Infinity, Infinity, Infinity,

Infinity, Infinity, Infinity, Infinity, Infinity}

In:=
a^b

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

In:=
Precision /@ %

Out=
{MachinePrecision, MachinePrecision, MachinePrecision,

MachinePrecision, MachinePrecision,

MachinePrecision, MachinePrecision,

MachinePrecision, MachinePrecision, MachinePrecision}

In:=
\$MachinePrecision

Out=
15.9546

In:=
\$Version

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

Regards,
Jean-Marc

 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