From c7b3e7149f579a63c15646b53376dde87b55bbae Mon Sep 17 00:00:00 2001 From: villberg Date: Mon, 23 Jun 2014 12:02:34 +0000 Subject: [PATCH] refs #4994 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29690 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/fi/semantum/sysdyn/solver/Environment.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java index a8c875d6..d3cfce24 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java @@ -100,6 +100,15 @@ final public class Environment implements IEnvironment, ISystem { return Math.exp(x); } + }); + model.functions.put("log", new Fn1(2) { + + @Override + public Object evaluate(IEnvironment environment, int argc) { + Double x = (Double)environment.getValue(0); + return Math.log(x); + } + }); model.functions.put("zidz", new Fn1(2) { -- 2.47.1