[llvm-commits] CVS: llvm/test/Programs/MultiSource/Applications/siod/test.scm
Brian Gaeke
gaeke at cs.uiuc.edu
Fri Mar 12 15:32:03 PST 2004
Changes in directory llvm/test/Programs/MultiSource/Applications/siod:
test.scm updated: 1.2 -> 1.3
---
Log message:
Actually print out the Fibonacci number.
---
Diffs of the changes: (+14 -7)
Index: llvm/test/Programs/MultiSource/Applications/siod/test.scm
diff -u llvm/test/Programs/MultiSource/Applications/siod/test.scm:1.2 llvm/test/Programs/MultiSource/Applications/siod/test.scm:1.3
--- llvm/test/Programs/MultiSource/Applications/siod/test.scm:1.2 Sun Feb 29 21:33:34 2004
+++ llvm/test/Programs/MultiSource/Applications/siod/test.scm Fri Mar 12 15:31:02 2004
@@ -63,16 +63,23 @@
(newline))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Fibonacci test
+
+(define (fib n)
+ (if (< n 2)
+ n
+ (+ (fib (- n 1)) (fib (- n 2)))))
+
+(define (fib-test)
+ (display "the 33rd Fibonacci number is ")
+ (display (fib 33))
+ (newline))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Run some simple tests
(print-countdown 10)
(print-signum -42)
(print-signum 0)
(print-signum 42)
(simple-proplist-test)
-
-(define (fib n)
- (if (< n 2) n
- (+ (fib (- n 1)) (fib (- n 2)))
-))
-
-(fib 33)
+(fib-test)
More information about the llvm-commits
mailing list