Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 1996

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

Search the Archive

Re: Numerical Evaluation of Sqrt[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4106] Re: Numerical Evaluation of Sqrt[]
  • From: Harald Berndt <haraldb at nature.berkeley.edu>
  • Date: Tue, 4 Jun 1996 02:19:24 -0400
  • Organization: University of California Forest Products Lab
  • Sender: owner-wri-mathgroup at wolfram.com

Dennis S. Lindell wrote:
> 
> Folks,
> 
> I'm a new user of Mathematica and am unable to get a full numerical
> evaluation of the Sqrt function in one case.  Following are the
> input and output lines of the case giving me trouble.
> 
> In[]:=  a=2;
>         b=2;
>         c=2;
>         d=2;
>         e=2;
>         f=2;
>         g=Sqrt[(a+b)^2 + (c+d)^2 + (e+f)^2]
> 
> Out[]=  Sqrt[32. + 16. ]
> 
> I've tried appending //N and inclosing the function in N[], but the
> result is the same.  I'd be grateful for any pointers,
> 
> Please respond directly to me at <lindell at arl.mil>.

What version of Mathematica are you using? I cannot duplicate your 
problem. I get:

In[20]:=
a=2;
b=2;
c=2;
d=2;
e=2;
f=2;
g=Sqrt[(a+b)^2 + (c+d)^2 + (e+f)^2]
Out[26]=
4 Sqrt[3]
In[27]:=
N[g]
Out[27]=
6.9282

-- 
_______________________________________________________________
Harald Berndt                          University of California
Research Specialist                  Forest Products Laboratory
Phone: 510-215-4224                            FAX:510-215-4299
_______________________________________________________________


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Mathlink / CodeWarrior 8
  • Next by Date: Re: Printing of Notebooks
  • Previous by thread: Re: Numerical Evaluation of Sqrt[]
  • Next by thread: Re: operations with lists