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

MathGroup Archive 2007

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

Search the Archive

Re: Sometimes <space> means multiple , sometimes not

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75363] Re: Sometimes <space> means multiple , sometimes not
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 26 Apr 2007 03:37:32 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <f0n6su$p9d$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

a) operators like "+" and "*" have a priority value that
    deterimines that a*b+c is translated into
    Plus[Times[a,b],c] and *not* into Times[a,Plus[b,c]]
b) the space as multiplication operator has a very low priority
    (lower than "*") and so in your examples the higher priority
     of "+" and "-"  supersede the " " operation.

Regards
   Jens

siewsk at bp.com wrote:
> As a newbie, I was taught that <space> character in Mathematica means
> multiple. But sometimes it does not.
> 
> For example:
> 
> 4<space>2  gives 8
> 
> but
> 
> -4<space>-2 does not give -8
> 
> This strange behavior can be show below
> 
> In[1]:= 4 2   (* 4<space>2 *)
> Out[1]= 8
> 
> In[2]:= 4 +2   (* 4<space>+2 *)
> Out[2]= 6
> 
> In[3]:= +4 2   (* +4<space>2 *)
> Out[3]= 8
> 
> In[4]:= +4 +2   (* +4<space>+2 *)
> Out[4]= 6
> 
> In[5]:= +4 -2  (* +4<space>-2 *)
> Out[5]= 2
> 
> In[6]:= 4 -2   (* 4<space>-2 *)
> Out[6]= 2
> 
> In[7]:= -4 -2  (* -4<space>-2 *)
> Out[7]= -6
> 
> In[8]:= -4 2  (* -4<space>2 *)
> Out[8]= -8
> 
> 


  • Prev by Date: Re: Sometimes <space> means multiple , sometimes not
  • Next by Date: Re: Sometimes <space> means multiple , sometimes not
  • Previous by thread: Re: Sometimes <space> means multiple , sometimes not
  • Next by thread: RE: Re: Sometimes <space> means multiple , sometimes not