Simplification of expressions with Euler's number

14 views
Skip to first unread message

João Francisco Barreto da Silva Martins

unread,
Nov 27, 2017, 2:53:22 AM11/27/17
to Jep Java Users
Hello,

I searched everywhere but couldn't find anything related with the ability of Jep to understand and workaround expressions with Euler's number in them. I have equations which use a lot of logistic (sigmoid) functions, and I would like to know if Jep will be able to understand that e is not a variable, but Euler's number instead, and also if it will be able to simplify expressions like these. Thanks in advance.

Richard Morris

unread,
Nov 28, 2017, 11:32:44 AM11/28/17
to Jep Java Users
In Jep there is a special type of variable which are marked as constant. By default pi, e, i, true and false are marked as constants. 
The only real effect of this is that you cannot change a constants variable so an expression like "pi = 3" will cause an exception.
It is possible to add your own variables. 

The standard Jep does not really have symbolic capabilities. Its focus is on parsing and evaluation. 

I am very close to releasing a set of extensions to Jep which add some limited symbolic facilities. It will be able to simplify some expressions, do symbolic differentiation and allow some rewriting rules. But this does not mean Jep is a full computer algebra system, just that it allows some symbolic operations to make
evaluation more efficient. You can see a demo of what it might be able to do symbolically at http://singsurf.org/djep/DJepConsole.php

Hope that of help

Richard

João Francisco Barreto da Silva Martins

unread,
Nov 28, 2017, 12:42:53 PM11/28/17
to Jep Java Users
Thanks for your answer Richard, that was exactly what I was looking for!
Reply all
Reply to author
Forward
0 new messages