Post Reply 
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 ?
My guess is it never even check that.

Negative number raised to non-integer exponent is a automatic fail.

Try (-128)^INV(3) instead, since INV(INV(3)) = 3 (binary or decimal, any precision)

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"
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-35’s x^y Why? - Matt Agajanian - 10-30-2021, 06:33 PM
RE: HP-35’s x^y Why? - toml_12953 - 10-30-2021, 06:43 PM
RE: HP-35’s x^y Why? - TomC - 10-30-2021, 07:41 PM
RE: HP-35’s x^y Why? - Peet - 10-30-2021, 08:46 PM
RE: HP-35’s x^y Why? - Gerson W. Barbosa - 10-30-2021, 09:54 PM
RE: HP-35’s x^y Why? - Steve Simpkin - 10-30-2021, 11:43 PM
RE: HP-35’s x^y Why? - Peet - 10-31-2021, 07:45 AM
RE: HP-35’s x^y Why? - Steve Simpkin - 10-31-2021, 07:07 PM
RE: HP-35’s x^y Why? - Peet - 10-31-2021, 09:18 PM
RE: HP-35’s x^y Why? - Didier Lachieze - 10-31-2021, 09:49 PM
RE: HP-35’s x^y Why? - lrdheat - 10-31-2021, 12:00 AM
RE: HP-35’s x^y Why? - Steve Simpkin - 10-31-2021, 12:23 AM
RE: HP-35’s x^y Why? - rprosperi - 10-31-2021, 01:09 AM
RE: HP-35’s x^y Why? - Steve Simpkin - 10-31-2021, 01:34 AM
RE: HP-35’s x^y Why? - Dave Britten - 10-31-2021, 01:31 PM
RE: HP-35’s x^y Why? - rprosperi - 10-31-2021, 08:18 PM
RE: HP-35’s x^y Why? - Steve Simpkin - 10-31-2021, 09:39 PM
RE: HP-35’s x^y Why? - rprosperi - 10-31-2021, 11:59 PM
RE: HP-35’s x^y Why? - Steve Simpkin - 11-01-2021, 12:51 AM
RE: HP-35’s x^y Why? - ijabbott - 11-01-2021, 08:40 PM
RE: HP-35’s x^y Why? - EdS2 - 11-01-2021, 09:54 AM
RE: HP-35’s x^y Why? - rprosperi - 11-01-2021, 12:40 PM
RE: HP-35’s x^y Why? - John Keith - 11-01-2021, 02:47 PM
RE: HP-35’s x^y Why? - robve - 11-03-2021, 02:37 AM
RE: HP-35’s x^y Why? - robve - 11-03-2021, 03:46 AM
RE: HP-35’s x^y Why? - Albert Chan - 11-03-2021, 07:45 AM
RE: HP-35’s x^y Why? - robve - 11-03-2021 01:44 PM
RE: HP-35’s x^y Why? - Albert Chan - 11-03-2021, 03:21 PM
RE: HP-35’s x^y Why? - J-F Garnier - 11-03-2021, 07:47 AM
RE: HP-35’s x^y Why? - robve - 11-03-2021, 02:38 PM
RE: HP-35’s x^y Why? - J-F Garnier - 11-03-2021, 03:43 PM
RE: HP-35’s x^y Why? - robve - 11-03-2021, 05:46 PM
RE: HP-35’s x^y Why? - J-F Garnier - 11-03-2021, 06:41 PM
RE: HP-35’s x^y Why? - robve - 11-03-2021, 08:04 PM
RE: HP-35’s x^y Why? - Albert Chan - 11-03-2021, 06:22 PM
RE: HP-35’s x^y Why? - cdmackay - 11-02-2021, 04:22 PM
RE: HP-35’s x^y Why? - ijabbott - 11-02-2021, 08:09 PM
RE: HP-35’s x^y Why? - Gene - 11-02-2021, 04:31 PM
RE: HP-35’s x^y Why? - Jeff O. - 11-04-2021, 09:15 PM
RE: HP-35’s x^y Why? - Guenter Schink - 11-04-2021, 09:21 PM



User(s) browsing this thread: 2 Guest(s)