MathGroup Archive 2000

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

Search the Archive

Re: Multiplication by 0.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24178] Re: [mg24126] Multiplication by 0.0
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Wed, 28 Jun 2000 22:50:59 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

on 00.6.28 3:11 PM, Brian Higgins at bghiggins at ucdavis.edu wrote:

> 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.
> 

The last bit is easy:

In[1]:=
SetPrecision[0., 0]

Out[1]=
0

so this is just the same as your first example (0*a).

As for why 0.*a returns the input unevaluated, it is helpful to ask onself
the question: what should the output be? Since a can take represent value,
it would seem that any numerical choice would lead to a contradiction. If
the answer were to be 0. that would not be consistent with the fact that:

In[3]:=
0.*0

Out[3]=
0

(setting a->0).

If on the other hand the answer were 0, it would not be consistent with lots
of things, e.g. (setting a->1

In[4]:=
0.*1

Out[4]=
0.

So I guess the logical choice is to return the input unevaluated and wait
for a value to be assigned to a.

The may be other reasons too, but the above seem convincing enough to me.


-- 
Andrzej Kozlowski
Toyama International University, JAPAN

For Mathematica related links and resources try:
<http://www.sstreams.com/Mathematica/>



  • Prev by Date: Re: pass to a C program
  • Next by Date: saving notebook files
  • Previous by thread: Multiplication by 0.0
  • Next by thread: Re: Multiplication by 0.0