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: Multiplication by 0.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24171] Re: Multiplication by 0.0
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 28 Jun 2000 22:50:52 -0400 (EDT)
  • References: <8jc6bm$d9k@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Brian,

Formally

SetPrecision[0., 0]

        0
(the integer 0)
And 0 * (anything)  is taken to be 0 (leaving aside Indeterminates and
Infinities)

Numbers are taken to be the same if they do not differ within the precision
of the least precise. So, with zero precision no difference can be detected.


Another example:

SetPrecision[1234, 2] == 1200

        True

Information is retained:

InputForm[SetPrecision[1234, 2]]

        1234.`2



However,  0. is treated specially:

z = SetPrecision[2.3, 0]

        0.

Not the integer 0   .

Information is retaind

InputForm[z]

        2.3`0

And although

z == 0

        True
and

 23 z == 0

        True

we get

z a == 0

        0. a == 0

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Brian Higgins" <bghiggins at ucdavis.edu> wrote in message
news:8jc6bm$d9k at smc.vnet.net...
> Dear Mathgroup,
>
> Consider the following:
> In[49]:=0*a
> Out[49]=0
>  Now if we replace 0 with 0.0
> In[51]:=0.0*a
> Out[51]=0.*a
> If we set the precision
> In[52]:=SetPrecision[0., 0]*a
> Out[52]=0
>
> What is the simple explanation for this behavior?
>
> Brian
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>






  • Prev by Date: saving notebook files
  • Next by Date: Re: Plotting complex functions
  • Previous by thread: Re: Multiplication by 0.0
  • Next by thread: reply