summaryrefslogtreecommitdiffstats
path: root/arith.c
diff options
context:
space:
mode:
Diffstat (limited to 'arith.c')
-rw-r--r--arith.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arith.c b/arith.c
index 6bb82efd..a820dc8e 100644
--- a/arith.c
+++ b/arith.c
@@ -1296,6 +1296,36 @@ inval:
anum, bnum, nao);
}
+val floorf(val num)
+{
+ return flo(floor(c_flo(to_float(lit("floor"), num))));
+}
+
+val ceili(val num)
+{
+ return flo(ceil(c_flo(to_float(lit("ceil"), num))));
+}
+
+val sine(val num)
+{
+ return flo(sin(c_flo(to_float(lit("sin"), num))));
+}
+
+val cosi(val num)
+{
+ return flo(cos(c_flo(to_float(lit("cos"), num))));
+}
+
+val atang(val num)
+{
+ return flo(atan(c_flo(to_float(lit("atan"), num))));
+}
+
+val loga(val num)
+{
+ return flo(log(c_flo(to_float(lit("log"), num))));
+}
+
/*
* TODO: replace this text-based hack!
*/