[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fractional powers
From: |
Heber Farnsworth |
Subject: |
fractional powers |
Date: |
Tue, 12 Nov 1996 10:41:48 -0800 (PST) |
I'm somewhat disturbed by the following behaviour on octave. Perhaps it
is standard and I shouldn't be worried but it surprised me. Consider the
following question: what is the cube root of -1? Clearly the answer
should be -1. Now ask octave
octave:1> x = (-1)^(1/3)
x = 0.50000 + 0.86603i
it gets wierder if you now cube that number
octave:2> x^3
ans = -1.0000e+00 + 1.2246e-16i
This is pretty close to the truth but still strange to my way of thinking.
Similar wierdness shows up with other fractional powers: 1/5, 1/7, etc.
Any thoughts?
Heber Farnsworth | Department of Finance
Univerity of Washington | Box 353200
tele: (206) 528-0793 home | Seattle, WA 98195-3200
tele: (206) 543-4773 finance web: http://weber.u.washington.edu/~heberf
fax: (206) 685-9392 email: address@hidden
- fractional powers,
Heber Farnsworth <=