Implicit multiplication



On 11/13/2011 7:14 AM, Luasjian wrote:
> Hm..
> thanks for the hint. But in my case maxima get's it input from an 
> formula editor which represents it's data in openmath and parses it to 
> mathematical expressions.

If some parser takes as input n*(n+1) and produces n(n+1), then you 
should not use that parser because somewhere along the way, it is wrong.


> This parser produces output like n(n+1). So probalby the problem is 
> exactly at this point. Or is there a alternative to get openmath into 
> maxima (directly to the input or its syntax)?

I suspect you are doing something WAY wrong.  If you have a correct 
openmath parser, then it presumably generates some kind of huge openmath 
data   for example,  sin(x) becomes

  <OMOBJ>
     <OMA>
       <OMS name="sin" cd="transc1"/>
       <OMV name="x"/>
     </OMA>
   </OMOBJ>

This is quite different from the data that would be generated by  sin * (x).


If you want to convert openmath to Maxima, you should NOT do it by converting openmath
to an ambiguous text string.  You could do it by converting to an unambiguous text string,
or taking the openmath structure and generating Maxima's internal form.  In  this case it would
be a lisp expression,  ((%sin) $x). IN my opinion, that would be the right way.

While I doubt that English is your first language, I hope you don't mind a correction...
You seem to like apostrophes too much.  The word " it's " is a contraction for "it is"
and has nothing to do with possessives, ever.

  You should learn to use "its".  Also "get's" is not a word.

RJF



> 2011/11/13 Richard Fateman <fateman at eecs.berkeley.edu 
> <mailto:fateman at eecs.berkeley.edu>>
>
>     On 11/13/2011 6:17 AM, Luasjian wrote:
>
>         Hey everybody,
>
>         is it possible to do a multiplication without an asterik?
>         I don't mean a function call but something like 2n understood
>         as 2*n
>         or a(b+c) as a*(b+c)
>
>         Thanks in advance.
>         Luajian
>
>
>     This is probably a bad idea unless you have another syntax in mind
>     for sin(x), which usually does not mean sin*x.
>
>     Mathematica does this,  requiring the user to type Sin[x].
>
>     Is that what you want?
>
>     It is certainly possible to write another parser for Maxima.  Or
>     use the Mathematica parser written in Lisp that I've posted, or
>     that someone else posted on sourceforge (Mockmma).
>
>     RJF
>
>