This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (fib-p n) | |
(let1 r5 (sqrt 5) | |
(round->exact (* (/ 1 r5) | |
(- (expt (/ (+ 1 r5) 2) n) | |
(expt (/ (- 1 r5) 2) n)))))) | |
(use srfi-1) | |
(map fib-p (iota 30 1)) | |
;; (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040) |
知りませんでした。。
0 件のコメント:
コメントを投稿