I hereby claim:
- I am kEND on github.
- I am kEND (https://keybase.io/kEND) on keybase.
- I have a public key whose fingerprint is 9156 BD9B 2404 9264 A1C3 6612 F808 8AEF 960C 46A5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Verifying myself: My Bitcoin username is +kend. https://onename.io/kend |
(define (p) (p)) | |
(define (test x y) | |
(if (= x 0) | |
0 | |
y)) | |
applicative-order evaluation | |
evaluate arguments and then apply | |
normal-order evaluation |
;; good-enough? | |
The good-enough? test used in computing square roots will not be very effective for | |
finding the square roots of very small numbers. Also, in real computers, arithmetic operations are | |
almost always performed with limited precision. This makes our test inadequate for very large | |
numbers. Explain these statements, with examples showing how the test fails for small and large | |
numbers. An alternative strategy for implementing good-enough? is to watch how guess changes | |
from one iteration to the next and to stop when the change is a very small fraction of the guess. Design | |
a square-root procedure that uses this kind of end test. Does this work better for small and large | |
numbers? |
SICP 1.1 | |
10 | |
=> 10 | |
(+ 5 3 4) | |
=> 12 | |
(- 9 1) | |
=> 8 | |
(/ 6 2) | |
=> 3 | |
(+ (* 2 4) (- 4 6)) |
SICP 1.2 | |
(/ (+ 5 4 | |
(- 2 | |
(- 3 | |
(+ 6 | |
(/ 5 4) | |
) | |
) | |
) | |
) |
(define (square x) (* x x)) | |
(define (sum-of-squares x y) (+ (square x) (square y))) | |
(define (larger x y) (if (> x y) x y)) | |
(define (sum-squares-of-largest-two x y z) | |
(cond ((and (> x y) (> x z)) (sum-of-squares x (larger y z))) | |
((and (> y x) (> y z)) (sum-of-squares y (larger x z))) | |
(else (sum-of-squares z (larger x y))) |
(define (a-plus-abs-b a b) | |
((if (> b 0) + -) a b) | |
b is evaluated to be greater than zero or not | |
based on that evaluation the + or - operator is selected | |
and used to add a and b if b is positive or subtract b from a if b is negative |
;; new-if.... | |
With the new-if, things look good when the case is simple and it doesn't matter if the then-clause and else-clause get evaluated. Using the special form if, first the predicate will be evaluated and then the then-clause OR the else-clause. With the new-if procedure, all arguments will be evaluated first. This sqrt-iter will not progress to any result. Infinite loop. |
Our God is a God "full of grace and truth" Jn 1:14.
What are grace and truth? What happens when they are divided?
Grace is the unmerited favor of God towards people. It is unconditional love and acceptance. Relationship with God. Relational aspect to God's character.