From 0bfe90e1fd4182d489a4933702a4ccaef3fd6eeb Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 18 Aug 2018 16:30:32 +0000 Subject: * net/ricketyspace/sicp/two/eleven.scm: Add Guile REPL output. --- net/ricketyspace/sicp/two/eleven.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'net') 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) -- cgit v1.2.3