Inverse Harmonic and Inverse Digamma Functions
|
09-02-2020, 07:48 PM
Post: #3
|
|||
|
|||
RE: Inverse Harmonic and Inverse Digamma Functions
Compare these expressions, which should be equivalent:
XCas> subst(x>0, x=1) → true XCas> subst(ifte(x>0, true, false), x=1) → "Ifte: Unable to check test Error: Bad Argument Value" ifte() tried to evaluate the expression, before substitution. However, "x>0", cannot be evaluated. XCas> subst(ifte(x-x, true, false), x=1) → false XCas> subst(0/x, x=0) → 0 Again, expressions were evaluated first, before substitution. This is branchless invPsi(x), to avoid above ifte() issues. This version is able to do "plot(invPsi(x), x=-1 .. 1)" Code: invPsi(x) := { Both "then" and "else" branch were evaluated, which is not ideal. Also, -1/x guess replaced by -1/(x+not(x)), to patch against divide-by-zero. XCas> subst(invPsi(x), x = 0) → 1.46163214497 XCas> subst(invPsi(x), x = -euler_gamma) → 1.0 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Inverse Harmonic and Inverse Digamma Functions - Albert Chan - 09-01-2020, 09:06 PM
RE: Inverse Harmonic and Inverse Digamma Functions - Albert Chan - 09-02-2020, 11:03 AM
RE: Inverse Harmonic and Inverse Digamma Functions - Albert Chan - 10-30-2020, 09:57 PM
RE: Inverse Harmonic and Inverse Digamma Functions - Albert Chan - 09-02-2020 07:48 PM
RE: Inverse Harmonic and Inverse Digamma Functions - Albert Chan - 09-03-2020, 02:05 PM
|
User(s) browsing this thread: 1 Guest(s)