[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32533] Operator precedence for transpose inco
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #32533] Operator precedence for transpose incorrect |
Date: |
Sat, 26 Feb 2011 00:53:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/9.10 (karmic) Firefox/3.6.13 |
Follow-up Comment #5, bug #32533 (project octave):
I wrote a bunch of tests for operator precedence and have found 3 issues to
address.
First, the following:
1) !a++ does not work with the new patch. Both '!' and '++' are at the same
level of precedence, which usually implies left to right evaluation. However,
!a is just a number which then can not be incremented by the '++' operator.
The error message is
error: invalid lvalue function called in expression
2) Exponents, like the assignment operators (=), are supposed to group
right-to-left according to the documentation. This is not the case for either
the old parser or the parser with the new patch. Instead exponents are
evaluated left-to-right as any ordinary operator, but contrary to mathematical
notions and the documentation.
2^3^5 = 32768 which is 8^5.
2^(3^5) = 1.4e73
3) Unary minus and the pre-decrement operator do not work together. This one
is a real corner case and doesn't necessarily need to be fixed, but I thought
I'd mention it.
a = 2;
+--a
ans = 1
---a
error: invalid lvalue function called in expression
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32533>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/