en
Gerald Jay Sussman,Harold Abelson,Julie Sussman

Structure and Interpretation of Computer Programs

Сообщить о появлении
Загрузите файл EPUB или FB2 на Букмейт — и начинайте читать книгу бесплатно. Как загрузить книгу?
Эта книга сейчас недоступна
995 бумажных страниц
Уже прочитали? Что скажете?
👍👎

Цитаты

  • dariadiaцитирует4 года назад
    Fortunately, learning to program is considerably less dangerous than learning sorcery, because the spirits we deal with are conveniently contained in a secure way.
  • dariadiaцитирует4 года назад
    Exercise 1.18. Using the results of exercises 1.16 and 1.17, devise a procedure that generates an iterative process for multiplying two integers in terms of adding, doubling, and halving and uses a logarithmic number of steps.
  • dariadiaцитирует4 года назад
    Exercise 1.15. The sine of an angle (specified in radians) can be computed by making use of the approximation sin x ≈ x if x is sufficiently small, and the trigonometric identity

    to reduce the size of the argument of sin. (For purposes of this exercise an angle is considered “sufficiently small” if its magnitude is not greater than 0.1 radians.) These ideas are incorporated in the following procedures:
    (define (cube x) (* x x x)) (define (p x) (- (* 3 x) (* 4 (cube x)))) (define (sine angle) (if (not (> (abs angle) 0.1)) angle (p (sine (/ angle 3.0)))))
    a. How many times is the procedure p applied when (sine 12.15) is evaluated?
    b. What is the order of growth in space and number of steps (as a function of a) used by the process generated by the sine procedure when (sine a) is evaluated?

На полках

fb2epub
Перетащите файлы сюда, не более 5 за один раз