MathGroup Archive 2003

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

Search the Archive

RE: diffrence between ver 3.01 and 4.1 regarding N[]?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39194] RE: [mg39177] diffrence between ver 3.01 and 4.1 regarding N[]?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Mon, 3 Feb 2003 01:09:03 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Peter,

This has been a frequent question on MathGroup.

The behavior of N did change between Version 3 and Version 4.

Basically the purpose of N is to convert an exact number to an approximate
number. If the approximate number is machine precision, then by default it
now displays with 6 places. You can change that with the Option Inspector.
If the approximation is extended precision, then it displays with the
indicated precision.

The proper command for output formatting of numbers is NumberForm.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: peter weijnitz [mailto:pewei at algonet.se]
To: mathgroup at smc.vnet.net

I tried some of my Mathematica3.01 programs on a computer with
Mathematica4.1,
 there where some differences that I could not explain.

 Regarding N[]: consider for example:
with version 4.1 I got:

N[Sqrt[2.],16]->1.4142
and
N[Sqrt[2.],17]->1.4142135623730950

and in version 3.01:

N[Sqrt[2.],16]->1.414213562373095
and
N[Sqrt[2.],17]->1.4142135623730950

Using SetPrecision[Sqrt[2.],16] I could make Mathematica4.1 give me 16
digits precision.
Ideas?

Peter W




  • Prev by Date: RE: Random Trouble
  • Next by Date: Re: Processing lists of unrelated numbers with Do or While statement
  • Previous by thread: diffrence between ver 3.01 and 4.1 regarding N[]?
  • Next by thread: Re: diffrence between ver 3.01 and 4.1 regarding N[]?