SICP section 1.1
Posted on 2015-02-12 04:51:53 +0900 in SICP
1.3
In order to find out the bigger ones, compare them pairwisely.
1.4
This is the first order useage of the function, which is +
1.5
If it is evaluated in applicative order, then the evaluation of the (p)
would lead to infinite loop.
While, if it is evaluated in normal order, then 0
would return before it is evaluated.
1.6
If
is special form becuase it is not a regular expression, which will have its arguments being evaluted at first.
Onlyconsequent
OR alternative
will be evaluted, but never both at the same time.
The new-if
statement will lead to infinite loop.
1.7
For small numbers, such as (sqrt 0.00000000000002)
, the accuracy itself is too inaccurate.
For large numbers, such as (sqrt 20000000000000)
will be trapped in infinite loop.
The guess would be a fixed point which equals 4472135.954995
.
But 20000000000000/4472135.954995 =4472135.955
which is not equal to 4472135.954995
exactly.
The reason is for float number, when the exp bits gets larger, its coificent bits would loose some accuracy. Accurary lost meet with big exponent number, then this float number becomes inaccurate.