commit a91ef5f7ee8aaf604a60f2b9556edcb7cb4e7297
parent 8cf97699bed5510150ca87f0dd9667c48c3ae65c
Author: Ed van Bruggen <edvb@uw.edu>
Date: Tue, 23 Apr 2019 18:23:26 -0700
Define pi in tisp
Diffstat:
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/tibs/lib.tsp b/tibs/lib.tsp
@@ -67,6 +67,7 @@
(define if (macro (condition true false)
(list 'cond (list condition true) (list else false))))
+(define pi (* 4 (arctan 1.)))
(define e (exp 1.))
(define (root b p) (pow b (/ 1 p)))
(define (sqrt x) (root x 2))
diff --git a/tibs/math.c b/tibs/math.c
@@ -235,8 +235,6 @@ PRIM_TRIG(log)
void
tib_env_math(Env env)
{
- tisp_env_add(env, "pi", mk_dec(3.141592653589793));
-
tsp_env_fn(numerator);
tsp_env_fn(denominator);