Re: Not a machine-size real number?

• To: mathgroup at smc.vnet.net
• Subject: [mg9280] Re: [mg9260] Not a machine-size real number?
• From: Allan Hayes <hay at haystack.demon.co.uk>
• Date: Mon, 27 Oct 1997 02:46:51 -0500
• Sender: owner-wri-mathgroup at wolfram.com

```sorrodp at ece.WPI.EDU (Pedro Soria-Rodriguez) [mg9260] Not a machine-size
real number? gives:

> BB[I_,a_,NN,d_,z_]= (I*NN/(2*d))*(z/Sqrt[a^2+z^2])
> Plot[BB[1,0.05,100,0.01,z],{z,-1,1}]

Plot::"plnr":
BB[1,0.05,100,0.01,z] ] is not a machine-size real  number at z = -1
........

Pedro:
1) you need an underscore after NN, thus  NN_ . 2) even with this the
values of you function are all imaginary:

In[1]:=Table[BB[1,0.05,100,0.01,z],{z,-1,1,0.5}]

Out[1]={-4993.76 I,-4975.19 I,0. I,4975.19 I,4993.76 I}

which is what the message is warning about.

3) You can deal with the problem by removing I from the definiton   of
BB[..] or by using

Plot[Im[BB[1,0.05,100,0.01,z]],{z,-1,1}]

(this works of because  Plot[Im[BB[1,0.05,100,0.01,z]],{z,-1,1}]
only evaluates  Im[BB[1,0.05,100,0.01,z]] after plugging in  the
numerical values, otherwise we would be back to

Plot[BB[1,0.05,100,0.01,z],{z,-1,1}]

Allan Hayes
hay at haystack.demon.co.uk
http://www.haystack.demon.co.uk/training.html voice:+44 (0)116 2714198
fax: +44 (0)116 2718642
Leicester,  UK

```

• Prev by Date: speed of the ToCycles[] function
• Next by Date: graphing
• Previous by thread: Re: Not a machine-size real number?
• Next by thread: Re: Not a machine-size real number?