From 5eb60432c81bd13f26852a4cef9b1a570002883d Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 8 Nov 2017 15:40:50 +0100 Subject: Added ln function --- evaluator.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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_; -- cgit v1.2.3