RE: Annoying Little Problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg24732] RE: [mg24701] Annoying Little Problem*From*: "David Park" <djmp at earthlink.net>*Date*: Wed, 9 Aug 2000 02:31:33 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Nalanji, In old versions of Mathematica, like 2.2, N could actually be used to determine the number of digits displayed. This is no longer true. N is strictly for the purpose of converting exact expressions to approximate number expressions. Any number which becomes a machine precision number will be displayed with 6 digits (except for trailing zeros). You can change the number of digits in the Option Inspector. But what you really want to use is NumberForm. Since your vector is composed of exact numbers, you will also have to use N. NumberForm is useful only on approximate numbers. v2 = {4, 0, -6}; Sqrt[v2.v2] NumberForm[N[Sqrt[v2.v2]], 3] 2*Sqrt[13] 7.21 David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > -----Original Message----- > From: Nalanji Dreaming [mailto:ayrton at rac1.wam.umd.edu] To: mathgroup at smc.vnet.net > > I'm having an annoying little problem with version 4.0.1.0. I wrote the > following info in a notebook and ran it: > > Clear[v2] > v2 = {4, 0, -6} > N[Sqrt[v2.v2]] > N[Sqrt[v2.v2], 3] > > Now the third line gives me 7.2111 but the fourth line gives me the > same instead of 7.21. Does anyone have any idea what may be the problem? > Am I doing something wrong? > > thanks, > Nalanji Dreaming