HP-71B: 1^Inf Error
|
06-11-2023, 10:20 AM
(This post was last modified: 06-11-2023 12:58 PM by J-F Garnier.)
Post: #23
|
|||
|
|||
RE: HP-71B: 1^Inf Error
Hi Valentin,
(06-10-2023 06:29 PM)Valentin Albillo Wrote: One of [bad decisions] is the whole IEEE implementation, which no one in the users' base needed or asked for, and which only succeeded in adding unwanted complexity to the math functions implementation in assembler, also taking lots of ROM space to implement in the System and Math ROMs (and probably others), I would not use words as abrut as you do, but I agree that the IEEE implementation added a significant amount of complexity to the math code, especially in the MATH ROM that I know a little, having reverse-engineered most of it. The management of the IEEE features for complex numbers is really complex (pun intended)... BTW, the least useful IEEE feature, IMHO, is the inexact management (flag INX) that complicates the code a lot, for almost nothing. In real, engineering live, all results are inexact by nature. Quote:When raising the exact constant 1 to the power of 100, 1000, one million, a Googolplex or Googolplex! (factorial), we don't get a result that approaches 1, we get exactly 1 every time, all the time, period. Thus, it's clear that 1^Inf can be safely and logically defined as 1, so the HP-71B should have returned 1 as a default value, perhaps with an overridable Warning for the squimish, but never ever Error. If we see the 1^Inf expression as 1x1x1x... there is little doubt that the result is 1. But this is a trivial, useless case. Who will ever need to program the expression Y=1^X and attempt to evaluate it for X=Inf to calculate 1x1x1x... ? The point is that when the exponentiation code receives the arguments 1 and Inf to evaluate 1^Inf, the 71B has no way to know if these values come from a hardcoded 1^Inf expression, or are the results of the evaluation of a more complicate expression such as (1+1/X)^X for X=Inf. In that later case, the correct answer for X=Inf should be 2.718281828... not 1. Of course, in that case, the evaluation of (1+1/X)^X is "wrong" (i.e. not as expected) long before reaching X=Inf, for instance at X=1E12. So we may say it doesn't harm to give a "wrong" answer for X=Inf too, but it doesn't make any good neither. What I want to say here is that a default value of 1 for 1^Inf is just of little (if any) usefulness, and this may be the reason the 71B doesn't provide it. On the contrary, the default values 0^0=1 and Inf^0=1 may make things simpler in certain cases. As Albert wrote, default values are for convenience only, they are not the Truth. J-F Edit: typos. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)