Post Reply 
(28 48 49 50) Bernoulli Numbers
09-17-2023, 02:32 PM
Post: #13
RE: (28 48 49 50) Bernoulli Numbers
On a 50g this revised programme

Code:
Size: 251.

CkSum: # 991Bh

::
  CK1&Dispatch
  # FF
  ::
    ZINT 0
    SWAP
    FPTR2 ^DupQIsZero?
    case2drop
    ZINT 1
    FPTR2 ^DupZIsOne?
    case
    ::
      ZINT 2
      FPTR2 ^NDXFext
      FPTR2 ^QSub
    ;
    FPTR2 ^DupZIsEven?
    NOT
    case2drop
    ZINT 0
    DUP
    ZINT 2
    FPTR2 ^RADDext
    3UNROLL
    FPTR2 ^Z2BIN
    ZINT 0
    ZINT 0
    ZINT -1
    4PICK
    #2+
    ONE_DO
    ZINT 1
    7PICK
    INDEX@
    FPTR2 ^#>Z
    FPTR2 ^QDiv
    FPTR2 ^QSub
    FPTR2 ^QMul
    5PICK
    5PICK
    FPTR2 ^PPow#
    ROT
    FPTR2 ^QAdd
    SWAP
    5ROLL
    ZINT 1
    FPTR2 ^QAdd
    5UNROLL
    2DUP
    FPTR2 ^QMul
    INDEX@
    FPTR2 ^#>Z
    FPTR2 ^QDiv
    4ROLL
    FPTR2 ^QAdd
    3UNROLL
    LOOP
    2DROP
    4UNROLL3DROP
  ;
;

for input

102

returns

'3204019410860907078243020782116241775491817197152717450679002501086861530836678​158791/4326'

in

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


Messages In This Thread
RE: (48G) Bernoulli numbers - Gerald H - 09-06-2023, 08:48 AM
RE: (48G) Bernoulli numbers - John Keith - 09-06-2023, 11:04 AM
RE: (48G) Bernoulli numbers - Gerald H - 09-06-2023, 02:34 PM
RE: (48G) Bernoulli numbers - Albert Chan - 09-07-2023, 03:37 PM
RE: (48G) Bernoulli numbers - John Keith - 09-07-2023, 04:18 PM
RE: (28 48) Bernoulli numbers - John Keith - 09-08-2023, 08:09 PM
RE: (28 48) Bernoulli numbers - John Keith - 09-10-2023, 03:24 PM
RE: (28 48) Bernoulli numbers - John Keith - 09-10-2023, 07:45 PM
RE: (28 48 49 50) Bernoulli Numbers - Gerald H - 09-17-2023 02:32 PM



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