summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ricketyspace/sicp/two/eleven.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/ricketyspace/sicp/two/eleven.scm b/net/ricketyspace/sicp/two/eleven.scm
index 11d9dae..e28e91b 100644
--- a/net/ricketyspace/sicp/two/eleven.scm
+++ b/net/ricketyspace/sicp/two/eleven.scm
@@ -29,3 +29,35 @@
((signs n p n p) (make-interval (min (* lbx uby) (* ubx lby))
(* ubx uby)))
(else (error "Intervals not supported"))))
+
+;;; Guile REPL
+;;;
+;;; scheme@(guile-user)> ,use (net ricketyspace sicp two eleven)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval 5 7))
+;;; $8 = (-21 . -10)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval -5 -7))
+;;; $9 = (-21 . -10)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 7))
+;;; $10 = (-15 . 21)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval -5 7))
+;;; $11 = (-21 . 15)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 -7))
+;;; $12 = (-21 . 14)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval 5 7))
+;;; $13 = (-14 . 21)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval -5 7))
+;;; $14 = (-15 . 21)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval 5 7))
+;;; $15 = (10 . 21)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval -5 -7))
+;;; $16 = (10 . 21)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval 5 7))
+;;; $17 = (-21 . -10)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval -5 -7))
+;;; $18 = (-21 . -10)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval -5 7))
+;;; $19 = (-21 . 15)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 -7))
+;;; $20 = (-21 . 14)
+;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 7))
+;;; $21 = (-15 . 21)