Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,16 @@
*FLOAT64
@% = &1001010
PRINT "SQR(2) = " ; FNcontfrac(1, 1, "2", "1")
PRINT " e = " ; FNcontfrac(2, 1, "N", "N")
PRINT " PI = " ; FNcontfrac(3, 1, "6", "(2*N+1)^2")
END
REM a$ and b$ are functions of N
DEF FNcontfrac(a0, b1, a$, b$)
LOCAL N, expr$
REPEAT
N += 1
expr$ += STR$(EVAL(a$)) + "+" + STR$(EVAL(b$)) + "/("
UNTIL LEN(expr$) > (65500 - N)
= a0 + b1 / EVAL (expr$ + "1" + STRING$(N, ")"))