---
I did this primarly because I noticed the lack of an "expt" function in the lang (..then I also added log2 and log10).
Don't know if this is the correct way to do it nor if I'm missing something. Thanks!
builtins.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/builtins.c b/builtins.c
index 8a34db6..1454605 100644
--- a/builtins.c
@@ -419,9 +419,17 @@ BUILTIN("rand.float", rand_float)
return mk_double(cname(todouble(args[0]))); \
}
+BUILTIN("pow", pow)+{+ argcount(nargs, 2);+ return mk_double(pow(todouble(args[0]), todouble(args[1])));+}+BUILTIN_("sqrt", sqrt)
BUILTIN_("exp", exp)
BUILTIN_("log", log)
+BUILTIN_("log10", log10)+BUILTIN_("log2", log2)BUILTIN_("sin", sin)
BUILTIN_("cos", cos)
BUILTIN_("tan", tan)
--
2.40.0