diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-08 15:40:50 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2017-11-08 15:40:50 +0100 |
commit | 5eb60432c81bd13f26852a4cef9b1a570002883d (patch) | |
tree | 90d797a27319b7ba775b138f5a614eddf6366bd0 | |
parent | 6f6ff0e39eb6d771ef5336394079646ccdc18bd5 (diff) |
Added ln function
-rwxr-xr-x | evaluator.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/evaluator.ml b/evaluator.ml index 075f728..64d260e 100755 --- a/evaluator.ml +++ b/evaluator.ml @@ -285,7 +285,6 @@ let () = begin CompareNum.register t_int;
register0 "rand" f_number D.Num.rnd;
- register1 "exp" t_int f_number (fun x -> D.Num.of_float (exp @@ D.Num.to_float x));
register0 "pi" f_number (fun () -> D.Num.of_float (4. *. atan 1.));
register1 "sin" t_int f_number (fun x -> D.Num.of_float (sin @@ D.Num.to_float x));
register1 "cos" t_int f_number (fun x -> D.Num.of_float (cos @@ D.Num.to_float x));
@@ -301,6 +300,8 @@ let () = begin );
register1 "sqrt" t_int f_number (fun x -> D.Num.of_float (sqrt @@ D.Num.to_float x));
+ register1 "exp" t_int f_number (fun x -> D.Num.of_float (exp @@ D.Num.to_float x));
+ register1 "ln" t_int f_number (fun x -> D.Num.of_float (log @@ D.Num.to_float x));
register3 "if" (t_bool, t_int, t_int) f_number if_;
register3 "if" (t_bool, t_bool, t_bool) f_bool if_;
|