Wiki
Clone wikiEpsilon / Home
Overview
Epsilon is a textbased calculator written in Java. The UI is written with Swing.
General features:
 Allows the definition of new variables, operators, etc.
 Realtime syntax highlighting by parsing on a background thread.
 Performs exact integer arithmetic in some cases, but some operations (such as
sin
,ln
, etc.) will cause a conversion to 64bit floatingpoint.
Switching over to BigInteger
/BigDecimal
is on my todo list, but to be honest, I don't think Epsilon has much future as a Java desktop app, so I don't anticipate working on it much again. I really like using it, though.
Epsilon is free to use, opensource, and released under an MIT license:
Copyright (c) 20172018 David Staver
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
How to use
Download the .jar
file and run it. You will need at least Java 8 installed, which should not be a problem unless you haven't updated it for a long time. If Windows doesn't automatically open the .jar
, try downloading this .bat
to the same folder as the .jar
and opening it instead.
Epsilon will create a folder called EpsilonApplicationFiles
in the directory the .jar
is in. If you want to move the .jar
to somewhere else, you can move the folder along with it. If the folder is deleted or missing for some reason, Epsilon will recreate it.
Brief tutorial
To use Epsilon as a calculator, type an expression in the text field at the bottom of the interface and press Enter
. Epsilon has most of the typical operators and functions builtin.
How to use the :=
operator
:=
is the assignment operator by default, which can be used to define new symbols. For example x := 2
defines a variable named x
whose value is 2
. Epsilon has the following kinds of symbols:

Variables, which are a name associated with a value. For example,
pi
is a variable. (Epsilon makes no semantic distinction between "variables" and "constants".) 
Unary operators, which have a single operand. Unary operators can be either prefix (such as e.g.
x
) or suffix (such as e.g.x!
). Epsilon treats functions as unary prefix operators.An example of defining a new unary operator is
p% := p/100
which defines a new operator%
, which divides its operand by100
. (In other words,50%
would evaluate to0.5
.) An example of defining a new "functionlike" unary operator issq(x) := x*x
. 
Binary operators, which have two operands (such as e.g.
x+y
).An example of defining a new binary operator is
(n)choose(k) := (n!) / (k!(n  k)!)
, where e.g.4 choose 2
is6
. 
"Span" operators, such as absolute value (i.e.
x
) and parentheses. 
"Nary" operators, which have two or more operands, such as the tuplecreating comma. (For example,
x,y,z
creates a tuple with 3 elements. Epsilon can e.g. work with vectors this way.)
Symbols can also be defined using the symbol editor. The symbol editor also has more options, such as precedence and associativity.
To delete a symbol, assign it to undefined
. For example pi := undefined
deletes the symbol pi
, and f(x) := undefined
deletes the function f
. Symbols can also be deleted using the symbol editor.
How to use the ;
operator
Expressions can contain an ordered sequence of subexpressions via the ;
operator. The ;
operator works similar to the ,
operator in languages like C++ and JavaScript. In short, what this means is that an expression such as a;b
is evaluated by:

evaluating
a
, 
then evaluating
b

and the result is
b
.
The main usefulness of this is that it allows one to define "local" variables inside operator definitions. For example, f(a) := (b := (sqrt a); b*(b  1))
defines a functionlike operator which:

defines
b
(locally) as the square root ofa

and the result is
b*(b  1)
.
In other words, e.g. f(9)
would be equal to (√9)*(√9  1)
, or 3*2
which is 6
. This could have also been written f(a) := (sqrt a)*((sqrt a)  1)
, but variables are nice for more complicated functions.
Note that when a symbol is defined locally (such as b
in the preceding example), it only exists when the surrounding operator is being invoked.
Updated