Re: Precision of a number raised to a power

*To*: mathgroup at smc.vnet.net*Subject*: [mg73538] Re: Precision of a number raised to a power*From*: Bill Rowe <readnewsciv at sbcglobal.net>*Date*: Wed, 21 Feb 2007 01:51:00 -0500 (EST)

On 2/20/07 at 6:20 AM, sonyaBabken at yahoo.de (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. Unless you do specifically set the precision, any arbitrary decimal you enter will be a machine precision number. And Mathematica will return a machine precision number when you ask it to raise a machine precision number to an exact power. So, if you don't specify the precision of a, the precision of the answer will depend on you hardware rather than Mathematica. OTOH, if you do specify the precision of a, then you can have Mathematica tell you what the precision of a^b is simply by In[17]:= a = SetPrecision[Random[], 16]; In[18]:= Table[Precision[a^n], {n, 10}] Out[18]= {16.,15.699,15.5229,15.3979,15.301,15.2218,15.1549,15.0969,15.0458,15.} -- To reply via email subtract one hundred and four