Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

RE: Annoying Little Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24706] RE: [mg24701] Annoying Little Problem
  • From: "Jean-Marie Thomas" <jmt at agat.net>
  • Date: Wed, 9 Aug 2000 02:31:07 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Mathematica can either use your machine numerical function OR if more
precision is required, its own.
N is a numerical evaluation function.

Then if you evaluate
v={4, 0, -6}
N[Sqrt[v.v}] will compute a numerical evaluation of Sqrt[v.v]
See : N[Sqrt[v.v}]//FullForm to view the internals.

If you evaluate N[Sqrt[v.v},3], Mathematica will keep using the standard
numerical function. See N[Sqrt[v.v},3]//FullForm to view the internals.
N[Sqrt[v.v],64] will increase the precision.

If you need a formatting function, use NumberForm :
NumberForm[N at Sqrt[v.v], {3, 2}]
7.21



> -----Message d'origine-----
> De : Nalanji Dreaming [mailto:ayrton at rac1.wam.umd.edu]
> Envoyé : vendredi 4 août 2000 07:19
> À : mathgroup at smc.vnet.net
> Objet : [mg24701] Annoying Little Problem
>
>
> 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



  • Prev by Date: Re: A Functional Programming Question
  • Next by Date: RE: Annoying Little Problem
  • Previous by thread: Re: Annoying Little Problem
  • Next by thread: RE: Annoying Little Problem