Note: this repository contains the Java 8 version of the project. The NCalc and Natural Calc projects maintains a Java 7 branch based on Retrolambda.
Use especially the "2nd" button in the following calculator interfaces:
Read the Symja Manual for the description of the Symja language or browse the available functions. We encourage everyone to participate in our Wiki.
Features of the Symja language:
- arbitrary precision integers, rational and complex numbers
- differentiation, integration, equation solving, linear algebra, number theory, combinatorial, logic and polynomial functions...
- a general purpose Term Rewriting System and Pattern Matching engine
- use human readable math expression strings or the internal abstract syntax tree (AST) representation to code in Java. See the Unit test examples
- two REPLs are available in the library. A Console.java for standard math input and a MMAConsole.java for "Mathematica like syntax" input.
- Symja with "Mathematica like syntax" input can also be used interactively in a BeakerX/Jupyter Lab environment
- Symja can also be used interactively in the Java jshell
- the Rubi symbolic integration rules are used to implement the Integrate function, they can be systematically applied to determine the antiderivative of a wide variety of mathematical expressions.
-
Appengine web interface symjaweb.appspot.com - available as open source in this Github repository
-
Android App Calculator N+ on Google play store - available as open source in this Github repository provides an IDE mode to calculate arbitrary Symja expressions.
To get an idea of the kinds of expressions Symja handles, see the tests in this file.
>>> 24/60
2/5
>>> N(24/60)
0.4
>>> sin(30*degree)
1/2
>>> sin(pi/2)
1
>>> a+a+4*b^2+3*b^2
2*a+7*b^2
>>> solve({x^2-11==y, x+y==-9}, {x,y})
{{x->-2,y->-7},{x->1,y->-10}}
>>> dsolve({y'(x)==y(x)+2,y(0)==1},y(x), x)
{{y(x)->-2+3*E^x}}
>>> integrate(cos(x)^5, x)
-2/3*Sin(x)^3+Sin(x)^5/5+Sin(x)
>>> D(sin(x^3), x)
3*x^2*Cos(x^3)
>>> factor(-1+x^16)
(-1+x)*(1+x)*(1+x^2)*(1+x^4)*(1+x^8)
>>> factor(5+x^12, Modulus->7)
(2+x^3)*(4+x^6)*(5+x^3)
>>> expand((-1+x)*(1+x)*(1+x^2)*(1+x^4)*(1+x^8))
-1+x^16
>>> det({{1,2},{3,4}})
-2
>>> inverse({{1,2},{3,4}})
{{-2,1},
{3/2,-1/2}}
>>> factorinteger(2^15-5)
{{3,1},{67,1},{163,1}}
>>> refine(abs(n*abs(m)), n<0)
-n*Abs(m)- Download latest version from https://github.com/tranleduy2000/symja_android_library/releases
- Compile project using Android Studio
- Select
File->New->Module - Select
Import jar/aar package - Enter path of
*.aarhas been downloaded and clickFinish
- In your submodule
gradlefile, add
dependencies {
implementation project(':symja_android_library-release')
}android {
defaultConfig {
multiDexEnabled true
}
}- To build android app, open
gradle.propertiesand add this line. This project required8GB RAMto build
org.gradle.jvmargs=-Xmx8192M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
- Sync project
a) Fork the Symja repository to use as a starting point.
- Navigate to github.com/axkr/symja_android_library in your browser.
- Click the "Fork" button in the top-right of the page.
- Once your fork is ready, open the new repository's "Settings" by clicking the link in the menu bar on the left.
- Change the repository name to the name of your Library and save your changes.
b) Clone your new repository to your Google Android Studio or JetBrains IntelliJ Ideas workspace.
- Download at https://www.jetbrains.com/idea/ or https://developer.android.com/studio/index.html
- Select
File->New->Project from version control->GitHub - Enter your git repo -> click
Clone - Wait for sync project
For more information, see https://developer.android.com/studio/intro/migrate.html
If you have any questions about using or developing for this project, send me an email!
- the complete Symja system is published under the GNU GENERAL PUBLIC LICENSE Version 3.
If you would like to use parts of the system here are the associated licenses:
- the JAS Java Algebra System is published under the (LESSER) GNU GENERAL PUBLIC LICENSE licence. The Java bytecode is dual licenced also under the Apache 2.0 licence to allow usage in Android projects.
- the Hipparchus Mathematics Library is published under the Apache software licence
- the Symja parser libraries (org.matheclipse.parser* packages) are published under the APACHE LICENSE Version 2.0.
