File: README

package info (click to toggle)
jel 2.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,328 kB
  • sloc: javascript: 15,979; java: 6,767; xml: 1,729; makefile: 6
file content (59 lines) | stat: -rw-r--r-- 2,039 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
How to run the JEL calculator.

Calculator is one of the simpliest (and FIRST) JEL based programs. It
takes the expression as it's input, evaluates it once and prints the
result.

The sample command line to invoke the calculator on Windows is

   jre -cp ".;../../lib/jel.jar" Calculator "2*2"

on Linux this will be

   java -cp ".:../../lib/jel.jar" Calculator "2*2"

Both these commans should print the answer 4 promptly in their respec-
tive environments.

You can use functions, of java.lang.Math in your expressions.

Expressions to try : "2*2", "pow(sin(1),2)+pow(sin(3),2)",
"exp(log(55))", "exp(log(55F))", or any other....

Please report BUGS to metlov@fti.dn.ua.

Notes :
 1. Some shells try to interpret parts of expressions themselves when
they are not quoted. For example expression "2|2" can not be properly
executed in bash without quotes. Be sure to quote expressions if Your
shell requires it.

 2. This example does not demonstrate actual power of JEL as
expression is evaluated only once. Then, compiling it becomes the
waste of resources. Have this in mind, please.

 3. The same as the first note. For the simple programs (as
Calculator) You can achieve faster performance by DISABLING the JIT
compiler in Your VM. This is because only single expression is to be
compiled most methods in the compiler are executed only once. Be
informed, that the classical(not HotSpot) JIT compiles methods when
they are actually called. There is certain overhead connected with JIT
compilation, and if most methods are going to be executed once better
performance can be achieved by DISABLING jit. In the long run, of
course, JVM with JIT outperforms JVM without it.

Try to compare the runtime of 

   jre -cp ".;../../lib/jel.jar" Calculator "2*2"

 and

   jre -nojit -cp ".;../../lib/jel.jar" Calculator "2*2"

to see which is faster.


                               Copyright (C) 2016 Konstantin L. Metlov

This file is licensed to you under the terms of GNU Free Documentation
License as given in the appendix of JEL Manual.