Post Reply 
(35S) Perimeter of ellipse (Ramanujan 2nd Approximation)
07-31-2021, 01:36 PM (This post was last modified: 07-31-2021 01:43 PM by dlidstrom.)
Post: #8
RE: (35S) Perimeter of ellipse (Ramanujan 2nd Approximation)
Here’s a SysRPL implementation using Jazz syntax:

Code:

::
 CK2NOLASTWD
 CK&DISPATCH2
 REALREAL
 ::
  0
  {{ a b h }}
  a b %- DUP %*
  a b %+ DUP %*
  %/ !h
  %PI a b %+ %*
  %1 %3 h %*
  %10 %4 %3 h %* %- %SQRT %+
  %/
  %+
  %*
 ;
;

112.5 bytes
# 9C0Eh

2xHP48GX, HP 50g, two Retrotronik ram cards, DM42
/Daniel Lidström
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (35S) Perimeter of ellipse (Ramanujan 2nd Approximation) - dlidstrom - 07-31-2021 01:36 PM



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