commit fc8e1d1720788b9124590788eb03d0f2ddc92441
parent 5e36e1bf92f661ed6112fa06752d884d626ee813
Author: Ed van Bruggen <edvb@uw.edu>
Date: Fri, 11 Oct 2019 23:52:30 -0700
Add cube, inc, and dec
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tibs/lib.tsp b/tibs/lib.tsp
@@ -154,8 +154,11 @@
(define tau (* 2 pi))
(define e (exp 1.))
+(define (inc x) (+ x 1))
+(define (dec x) (- x 1))
(define (truncate x) (* (floor (abs x)) (sgn x)))
(define (sqr x) (* x x))
+(define (cube x) (* x (* x x)))
(define (root b p) (^ b (/ p)))
(define (sqrt x) (root x 2))
(define (cbrt x) (root x 3))