To: "Dr. Nikolaus Klepp" <off...@klepp.biz> Cc: 559...@bugs.debian.org Subject: Re: Bug#559435: bc: wrong operator precedence X-Draft-From: ("nnml+private:bc" 826) References: <20091204113255.18295.87026.report...@localhost.localdomain> From: John Hasler <jhas...@newsguy.com> Organization: Dancing Horse Hill --text follows this line-- >From the bc man page:
The expression precedence is as follows: (lowest to highest) || operator, left associative && operator, left associative ! operator, nonassociative Relational operators, left associative Assignment operator, right associative + and - operators, left associative *, / and % operators, left associative ^ operator, right associative unary - operator, nonassociative ++ and -- operators, nonassociative Note that "unary -" has _higher_ precedence than "^". Thus "-6^2" is equivalent to "(-6)^2". "-6" represents the negative number "minus six", not the expression "0-6". -- John Hasler jhas...@newsguy.com Elmwood, WI USA -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org