HP-35’s x^y Why?
|
11-03-2021, 01:44 PM
Post: #32
|
|||
|
|||
RE: HP-35’s x^y Why?
(11-03-2021 07:45 AM)Albert Chan Wrote: You are assuming the reason it fail is INV(INV(7)) does not revert back to 7 ? Yes. Implementation logic of ^ dictates to check that 1/(1/x) = x or close enough with respect to macheps. If 1/(1/x) ~= x integer then (-y)^(1/x) = -(y^(1/x)). Yes. Obviously, for negative x and non-integer y. Sort of. However, assuming y is limited to "easy" integer reciprocals only, then this is still an epic fail. Another fail: Casio fx-7000G: (-128)^(1/7) ERROR (-128)^(.1428571429) ERROR (as can be expected) Of course, the Casio allows an explicit nth root operation and so does the HP 35s: 7 n-root (-128)=-2 OK I'm not impressed by this Casio either. The lazy way to implement n-th root is to check if x is integer and calculate x n-root -y with -(x n-root y) = -(y^(1/x) = -EXP(LOG(y)/x). The correct way for a calculator's implementation logic is to consider the fact that x n-root y = y^(1/x) = signum(y) |y|^(1/x) if x is integer. By using this identity and root-power symmetry we can also avoid taking the LOG of a negative number. - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)