Post Reply 
(12C) log1p function
01-31-2019, 09:43 PM (This post was last modified: 01-31-2019 09:46 PM by Dieter.)
Post: #6
RE: (12C) log1p function
(01-31-2019 09:42 AM)Albert Chan Wrote:  Typo fixed. Thanks.

The second "Enter" at the beginning is still missing. Without it the code will not work.

(01-31-2019 09:42 AM)Albert Chan Wrote:  A (quite) accurate ln1+x function, or "how close can you get" part II thread had the same formula. Smile
Was there a part I ?

Yes, but that was about Bernoulli numbers:
http://www.hpmuseum.org/forum/thread-870.html

But I also posted a similar method for the e^x–1 function:
http://www.hpmuseum.org/forum/thread-5508.html

(01-31-2019 09:42 AM)Albert Chan Wrote:  My rpn.exe confirmed +correction way much better, and avoided divide-by-0 test.

Quote:>rpn
1.23456789e-3 s
1+ log s1 ? # log1p value
0.001233806437707756434884160067124232513609
r 1+ =-10 s2 ? log s3 ? # 1+X, LN(1+X) value
1.001234568
0.001233806547572121411586143127131058379588

- ?10 # correction wanted
-1.09864365E-10

r2 1- r $ - r2 / ?10 # correction = -(X+1-1-X)/(X+1)
-1.09864365E-10

r3 r x r2 1- / r3 - ?10 # correction = log1p(X) * X / (1+X-1) - log1p(X)
-1.099321546E-10

Please excuse me, Albert, but this is one more case where I see a lot of numbers and cryptic code, but I don't understand anything. Who may understand the meaning of "r 1+ =-10 s2 ? log s3 ? # 1+X, LN(1+X) value" ?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) log1p function - Albert Chan - 01-31-2019, 01:10 AM
RE: (12C) log1p function - Thomas Klemm - 01-31-2019, 04:08 AM
RE: (12C) log1p function - Paul Dale - 01-31-2019, 05:48 AM
RE: (12C) log1p function - Dieter - 01-31-2019, 08:45 AM
RE: (12C) log1p function - Albert Chan - 01-31-2019, 09:42 AM
RE: (12C) log1p function - Dieter - 01-31-2019 09:43 PM
RE: (12C) log1p function - Albert Chan - 01-31-2019, 10:55 PM
RE: (12C) log1p function - Werner - 02-01-2019, 07:07 AM
RE: (12C) log1p function - Albert Chan - 02-01-2019, 12:30 PM
RE: (12C) log1p function - Thomas Klemm - 02-02-2019, 12:28 PM
RE: (12C) log1p function - Albert Chan - 02-10-2019, 09:08 AM
RE: (12C) log1p function - Albert Chan - 02-10-2019, 02:19 PM



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