This console can perform calculations using various different fields including integers, fractions, decimals with a specific number of decimal places. Use
setfield integer
for normal integerssetfield bigint
for integers with unlimited sizesetfield rational
for fractions (rational numbers)setfield double
for standard floating point numberssetfield bigdec
for decimals with a specified number of decimal places
setprec 30
to set 30 significant figuressetfield complex
for complex numbersNote that changing the field resets all variables. The JavaScript versions may not always give the same results as the Java version as JavaScript has different ways of representing numbers.
The factorial(x)
function can be used to test the range of the various types. In a webbrowser with the javascript version:
> setfield integer Setting field INTEGER > factorial(10) 3628800 > factorial(20) 2432902008176640000 > factorial(21) 51090942171709440000 > factorial(22) 1.1240007277776077e+21Doubles work the same
> setfield double Setting field DOUBLE > factorial(21) 51090942171709440000 > factorial(22) 1.1240007277776077e+21BigIntegers allow much larger values
> setfield bigint Setting field BIGINT > factorial(20) 2432902008176640000 > factorial(30) 265252859812191058636308480000000 > factorial(40) 815915283247897734345611269596115894272000000000 > factorial(50) 30414093201713378043612608166064768844377641568960512000000000000
Calculations with fractions
Setting field RATIONAL > 1/6+1/2 2/3 > 1/6*2/5 1/15
The arbitaty fields are part of Jep Extensions a set of add-ons for the Jep mathematical expression parser. They include
Structured programming | Allows block style programming, such as for , while and do loops,
as well as java-style if-else blocks.
|
Fast Evaluation | Allows very fast evaluation for double precision, typically 4-5 times faster. This is used by the
Implicit plotter applet. It can evaluating (x^2+y^2)^3-4 x^2 y^2 for 250K points
in 0.064 seconds, i.e. 220 nano-seconds per evaluation. |
Mathml | Conversion to/from presentation MathML |
Simplification | removes redundant parts of expression like adding zero or multiplying by 1. |
Polynomial | Conversion to polynomials. Can be used to compare two polynomials. |
Matrices | Allows vectors and matrices to be used. Includes a range of vector and matrix functions like determinant and dot product. |
Statistical | A range of statistical functions |
Differentiation | Symbolic differentiation of expressions |
Fields | Allow calculations over specific fields such as the rationals. |