Post Reply 
RE: HP48-HP50G : Error functions ERF(z), FRESNEL integrals, PROBIT, etc.
12-23-2023, 03:36 PM (This post was last modified: 12-23-2023 03:45 PM by Gil.)
Post: #46
RE: RE: HP48-HP50G : Error functions ERF(z), inv, PROBIT, etc.
New version: 12c

The 7 main changes:

1) As all other functions, PROBIT function accepts now, as argument, a complex number.
Reason: PROBIT function is defined as k*Inverse_ERF, and the function Inverse_ERF does accept — theorically — a complex number as argument.

2) As PROBIT, the functions Inverse_ERF (called 'INV¦') and Inverse_ERFc (called 'INV¦c') use Newton's recursive algorithm when in presence of a complex number argument. Therefore, in order to prevent endless loops, a counter (with a maximum loop by default set at 90) in the subroutine 'inv¦z' has been introduced in the DO... UNTIL.

3) The second criterium to stop the DO... UNTIL in the subroutine 'inv¦z' is relative to finding a converging, acceptable solution. Now, this criterium was "facilitated", with the critical difference (to interrupt the DO... UNTIL routine) between two consecutive complex numbers found (a_n, b_n) and (a_n+1, b_n+1) passing from abs(a_n - a_n+1) & abs(b_n - b_n+1) = 10^-10 to 10^-9.

4) To avoid name confusion, the previously named function iERFc was "more correctly" renamed i¹ERFc, with a special mention at the beginning of the program, as the initial letter i does not stand here for the inverse function (inverse_ERFc). See Wikipedia or Wolfram Alpha for definition and signs, Wolfram definition reversing the terms.

Note: in the menu, you will see only the first characters i¹ERF (without the final letter c) of its full, real name i¹ERFc.
Reminder: the inverse_ERFc function is called here 'INV¦c' (and called INV¦ for the inverse_ERF function).

5) Similarly to the function i¹ERFc, a new function i²ERFc was created. See Wikipedia or Wolfram Alpha for definition and signs, Wolfram definition reversing the terms.

Note 1: in the menu, you will see only the first characters i²ERFc (without the final letter c) of its full, real name i²ERFc.
Note 2: the output values of i²ERFc function could not be checked with another program, so be careful when using that function.

6) Some parameters might be exceptionally changed (such as <—max.x, <—max.z <—loop.max or critic). Therefore, their default values are specially reminded, in the beginning of each program, in form of a string, should you change some of the corresponding values and want afterwards to get back their original values.

7) Special attention was given to have the same number of POP and PUSH commands in the different programs, in order to always finish/interrupt a program with 'ENVSTACK' containing, at the very end, an empty list { }.

PS
Two "cosmetical" corrections in version 12c
vs precious (now deleted) version 12b.


Attached File(s)
.hp  ERROR.12c.hp (Size: 15.07 KB / Downloads: 0)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RE: HP48-HP50G : Error functions ERF(z), inv, PROBIT, etc. - Gil - 12-23-2023 03:36 PM



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