Post Reply 
Natural logarithm of 2 [HP-15C/HP-42S/Free42 & others]
10-14-2019, 07:49 PM
Post: #14
RE: Natural logarithm of 2 [HP-15C/HP-42S/Free42 & others]
HP 50g:

Code:

%%HP: T(3)A(R)F(.);
\<< RCLF SWAP RAD -105 CF -3 CF R\->I DUP 8 LN / CEIL 8 OVER 2 - OVER * 10 + PICK3 DUP + SQ LASTARG - 4 PICK DUP
  SQ OVER DUP + 1 - ROT 4 * 1 + 0 DUP \-> c d0 d1 n m d2 s1 s2
  \<< 1 SWAP
    START d1 INV 's1' STO+ d0 NEG 'd1' STO+ c NEG 'd0' STO+ n s2 d2 + / 's2' STO m NEG 'n' STO+ -2 'm' STO+
    NEXT s1 d2 s2 +
  \>> INV + EXPAND FXND ROT ALOG OVER - PICK3 * SWAP IQUOT + \->STR -51 FC? { "0." } { "0," } IFTE SWAP + SWAP STOF
\>>

200 -> 0.69314718055994530941723212145817656807550013436025
         52541206800094933936219696947156058633269964186875
         42001481020570685733685520235758130557032670751635
         07596193072757082837143519030703862389167347112335

( 350 seconds )
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Natural logarithm of 2 [HP-15C/HP-42S/Free42 & others] - Gerson W. Barbosa - 10-14-2019 07:49 PM



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