[Kst] Equation parser - a possible BUG.

Barth Netterfield netterfield at astro.utoronto.ca
Sat Nov 20 18:00:30 CET 2004


He's right.  The parser is wrong.  '-' (and other unary operators?) should 
have the same precedence as multiplication (ie, below exponentiation). So we 
can interpret -x^2 as (-1)*x^2.  The current parser interprets it as (-x)^2.

see, eg, 
http://mathforum.org/library/drmath/view/53194.html

critcal bug, should be fixed for 1.0.

cbn

On November 20, 2004 09:18 am, Ron Daisy wrote:
> Dear George Staikos,
>
> As far as I understand you are the one that wrote the equation parser of
> kst.
>
> While playing with KST I found that the equation parsing failed to parse
> correctly the following equation:
>
>  exp(-(x-1)^2)
>
> The problem is that it performs the unary minus operator before the power
> of 2 as dictated
> by the precedence rules of arithmetics. This problem will show it self in
> all similar equation
> and seems to be critical.
>
>
> Hope helping improving the KST quality,
>
> Best regards,
>
> Ron.
>
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst



More information about the Kst mailing list