MathGroup Archive 2002

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

Search the Archive

Re: Problem with Precision?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34457] Re: [mg34447] Problem with Precision?
  • From: "Michael Math" <michael-math at science.edu>
  • Date: Wed, 22 May 2002 02:46:26 -0400 (EDT)
  • References: <200205210736.DAA16509@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

If you specify the precision of the number and request more a lot more
digits it works, e.g. N[1.602176462`10,50] produces the desired result,
although I am not sure why requesting "only" 10 digits of precision yields
less than that.

Producing the desired result:
1.602176462`10
N[1.602176462`10,50]

Not producing the desired result:
N[1.602176462,10], N[1.602176462`10,10], N[1.602176462,50]

The problem is that you can't always specify the precision of the number.
For example, I have the same problem with Pi:

In:= N[Pi,10]
Out:= 3.14159

In:= N[Pi,50]
Out:= 3.14159265358979...

A statement in the document for N may hold the clue:
"N[expr] gives a machine-precision number, so long as its magnitude is
between $MinMachineNumber and $MaxMachineNumber."

Michael

----- Original Message -----
From: "Mike" <M.P.Croucher at sheffield.ac.uk>
To: mathgroup at smc.vnet.net
Subject: [mg34457] [mg34447] Problem with Precision?


> Can anyone shed any light on why
>
> N[1.602176462,10]
>
> gives
>
> 1.60218
>
> I need it to be as accurate as I can get it and 5 dp doesn't cut it.  Any
ideas?
>
> Thanks
>
> Mike
>
>



  • Prev by Date: RE: Problem with Precision?
  • Next by Date: Plotting mulitple lists on one log plot
  • Previous by thread: Re: Problem with Precision?
  • Next by thread: Re: Problem with Precision?