Compare commits

...

2 commits

Author SHA1 Message Date
Geir Okkenhaug Jerstad 8d2504ab47 small sync 2024-09-02 08:59:04 +02:00
Geir Okkenhaug Jerstad 89c1d3be54 small sync 2024-09-02 08:58:30 +02:00
4 changed files with 15 additions and 6 deletions

14
MIT/sqrt.scm Normal file
View file

@ -0,0 +1,14 @@
(define (sqrt x)
(define tolerance 0.00001)
(define (good-enough? y)
(< (abs (- (* y y) x)) tolerance))
(define (improve y)
(average (/ x y) y))
(define (try y)
(if (good-enough? y)
y
(try (improve y))))
(try 1))
(sqrt 13)

1
Structure/test.scm Normal file
View file

@ -0,0 +1 @@
(define add2(+ 2))

View file

@ -1,6 +0,0 @@
; The first program
(begin
(display "Hello, World!")
(newline))

Binary file not shown.