Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -12,9 +12,9 @@
Must be loaded at an even address.
Input: Number is at 0D.]
T 56 K
GKA3FT42@A47@T31@ADE10@T31@A48@T31@SDTDH44#@NDYFLDT4DS43@TF
H17@S17@A43@G23@UFS43@T1FV4DAFG50@SFLDUFXFOFFFSFL4FT4DA49@T31@
A1FA43@G20@XFP1024FP610D@524D!FO46@O26@XFO46@SFL8FT4DE39@
GKA3FT42@A47@T31@ADE10@T31@A48@T31@SDTDH44#@NDYFLDT4DS43@TFH17@
S17@A43@G23@UFS43@T1FV4DAFG50@SFLDUFXFOFFFSFL4FT4DA49@T31@A1FA43@
G20@XFT44#ZPFT43ZP1024FP610D@524D!FO46@O26@XFO46@SFL8FT4DE39@
[Main routine]
T 120 K [load at 120]

View file

@ -0,0 +1,9 @@
infixl 7 *.
(*.) :: Num a => a -> [a] -> [a]
x *. (p:ps) = x*p : x*.ps
instance Num a => Num [a] where
negate = map negate
(+) = zipWith (+)
(*) (p:ps) (q:qs) = p*q : ((p*.qs) + ps*(q:qs))
fromInteger n = fromInteger n:repeat 0

View file

@ -0,0 +1,2 @@
catalan :: [Integer]
catalan = 1 : catalan^2

View file

@ -0,0 +1,2 @@
ghci> take 15 catalan
[1,1,2,5,14,42,132,429,1430,4862,16796,58786,208012,742900,2674440]

View file

@ -1,4 +1,4 @@
val factorial = fn x:if(x < 2: 1; x * self(x - 1))
val factorial = fn x:if(x < 2: 1; x * fn((x - 1)))
val catalan = fn n:factorial(2 * n) / factorial(n+1) / factorial(n)