]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
refs #4994
authorvillberg <villberg@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 23 Jun 2014 12:02:34 +0000 (12:02 +0000)
committervillberg <villberg@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 23 Jun 2014 12:02:34 +0000 (12:02 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29690 ac1ea38d-2e2b-0410-8846-a27921b304fc

fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/Environment.java

index a8c875d6c375dbe7c895a99c8e5a0443fd5f16d5..d3cfce2490c8b009ac9880d231619e39f3c29b91 100644 (file)
@@ -100,6 +100,15 @@ final public class Environment implements IEnvironment, ISystem {
                                return Math.exp(x);\r
                        }\r
                        \r
+               });\r
+               model.functions.put("log", new Fn1(2) {\r
+\r
+                       @Override\r
+                       public Object evaluate(IEnvironment environment, int argc) {\r
+                               Double x = (Double)environment.getValue(0);\r
+                               return Math.log(x);\r
+                       }\r
+                       \r
                });\r
                model.functions.put("zidz", new Fn1(2) {\r
 \r