commit cb66d5900f5ad9b1e611946ab75a39cbb01892f9
parent 00591ce43be8d719136c93dcab847ed25a86d2b8
Author: Ed van Bruggen <edvb@uw.edu>
Date: Thu, 10 Oct 2019 21:07:53 -0700
Define inverse trig functions
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/tibs/lib.tsp b/tibs/lib.tsp
@@ -162,6 +162,13 @@
(define (logb b x) (/ (log x) (log b)))
(define (log10 x) (logb 10. x))
+(define (csc x) (/ (sin x)))
+(define (sec x) (/ (cos x)))
+(define (cot x) (/ (tan x)))
+(define (arccsc x) (/ (arcsin x)))
+(define (arcsec x) (/ (arccos x)))
+(define (arccot x) (/ (arctan x)))
+
(define (abs x) (if (>= x 0) x (- x)))
(define (sgn x) (cond ((= x 0) 0) ((> x 0) 1) (else -1)))
(define (max a b) (if (> a b) a b))