MathGroup Archive 2007

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

Search the Archive

Re: Question about exponent shorthand

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83839] Re: Question about exponent shorthand
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Sun, 2 Dec 2007 04:07:00 -0500 (EST)
  • References: <firds9$rhc$1@smc.vnet.net>

Curtis Osterhoudt wrote:
> Hi, all, 
> 
>    I've just got used to using the character shortcut *^ to stand for "times 
> 10 to the power of". As expected, these two expressions work:
>    1*^5   --> 100000
>    1*^-5  --> 1/100000
> 
> But putting parentheses around the exponent (as I'd prefer to do for 
> readability) leads to 
> 
>   Input: 1*^ (-5)
> 
>    Output:  Syntax::sntxb:Expression cannot begin with "1.(-5)".
> 
>                  Syntax::tsntxi:"1.^" is incomplete; more input is needed.
> 
>                  Syntax::sntxi:Incomplete expression; more input is needed.
> 
> 
> This is on
> 
>  In[45]:= $Version
> 
> Out[45]= "6.0 for Linux x86 (32-bit) (June 19, 2007)"

I think that this is because *^ is not an operator, but part of the 
number, like in C and some other languages.  E.g. in C 1e-5 cannot be 
written as 1e(-5).

For readability, one could write 5 10^5, as Mathematica 6 automatically 
replaces the space denoting the multiplication with a cross. 
Unfortunately this seems to be buggy:  the replacement does not happen 
when ^5 is written as a superscript (CTRL-6 5).

-- 
Szabolcs


  • Prev by Date: Re: Re: how draw box with open front
  • Next by Date: Re: Re: how draw box with open front
  • Previous by thread: Re: Question about exponent shorthand
  • Next by thread: Re: Mathematica: Long divison for polynomials