Skip to content
Prev 200392 / 398503 Next

Odp: ^ operator

On 16-Nov-09 13:13:27, Liviu Andronic wrote:
Correct!!! I was inadvertently put on the wrong foot by Pietr
Pikal's comment about precedence, and as a result what I wrote
about precedence of "^" relative to "-" was on the wrong foot
throughout, and should be ignored. My apologies for any confusion
this may have caused to anybody.

In any case, this is not relevant to Carol White's query about
taking the cube root (or indeed any fractional power) of a
negative number. This can only be done (as Carol intended it)
by using the form sign(x)*(abs(x)^power).

As I tried to point out, there is a distinction between an
expression which the user may enter as x <- -1.234, and then
x^(1/3), expecting -(1.234^(1/3)), and the cube root of the
negative number x.

Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 16-Nov-09                                       Time: 13:40:06
------------------------------ XFMail ------------------------------