[scilab-Users] what am I doing wrong

jasper van baten jasper at amsterchem.com
Wed Sep 14 15:34:01 CEST 2011


Would be confusing if it were the other way 
around. Normally a unary minus has a lower 
operator precedence than a power. I cannot 
quickly find a list of scilab's operator 
precedence. I presume it is pretty standard. For example in

a - b - c

you would not expect b - c to get evaluated first 
and then subtracted from a... If you would want that, you would write

a - (b - c)

Jasper.



At 15:24 9/14/2011, Maso RICCI wrote:
>got it ...
>
>thanks for helping me
>
>but is it not a little confusing ?
>
>/maso
>
>Il 14/09/2011 15.20, Carrico, Paul ha scritto:
>>Try (-10)^2
>>
>>Different from -1*10^2 == -1*(10)^2
>>
>>Paul
>>
>>
>>Please consider the environment before printing this e-mail
>>
>>
>>-----Message d'origine-----
>>De : Maso RICCI [mailto:ricci2 at unisi.it]
>>Envoyé : mercredi 14 septembre 2011 15:18
>>À : users at lists.scilab.org
>>Objet : [scilab-Users] what am I doing wrong
>>
>>Ehm... pretty sure I am going to place a dummy question
>>
>>but I got to do it:
>>
>>is it corret the below result from my scilab console ?
>>
>>-->-10^2
>>    ans  =
>>
>>     - 100.
>>
>>thanks
>>
>>/maso
>
>--
>----------------------------------------
>Maso RICCI PhD
>Dipartimento Farmaco Chimico Tecnologico
>Università degli Studi di Siena
>Via Aldo Moro,2
>Siena
>
>phone: +390577234367
>email: ricci2 at unisi.it
>----------------------------------------




More information about the users mailing list