Post Reply 
HP-35’s x^y Why?
11-03-2021, 08:04 PM
Post: #39
RE: HP-35’s x^y Why?
(11-03-2021 06:41 PM)J-F Garnier Wrote:  It seems to me that having a y^(1/x) function is much more robust.

I agree that the floating point result of 1/x is certainly not reversible for all nonzero integers x. But surely it is reversible for a certain useful range of nonzero integers x when using proper internal floating point representations that include additional correction digits for rounding to 10 digits (or whatever the calculator uses).

This can be robust by determining a valid set of integers x, for example the largest positive k such that x=[1,k] is a valid range for 1/x to be "practically" accurately reversible (at least avoid unnecessary roundoff of the correction digits) in order to perform y^(1/x) accurately. Furthermore, determining a range of integers x means that xroot can be used to produce a more accurate answer for y^(1/x). I consider this a win.

However, and I think this your concern, ultimately this means accepting that 0.333333333333 with two extra digits as internal float representation equals 1/3 but 0.3333333333 rounded, displayed or entered does not. Calculators use internal extra digits for a reason though. Trying to replicate this with C/C++, Lua and Python can be a bit misleading if the algorithm isn't replicating the correction digits roundoff rules exactly.

Either way, that is not happening in the Saturn architecture for that reason or the other reason is internal floating point roundoff in which 1/x*LOG(y) differs from LOG(y)/x. It's unnecessary to get (125)^(1/3)=4.9999..., especially for small integer values of x such as x=3. On the other hand, the decision makes sense in historical context, because additional complexity requires more ROM space.

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
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: 1 Guest(s)