Wiki
Clone wikisymja_android_library / Home
Symja - Java Computer Algebra Library
Symja is a general purpose Java library for symbolic mathematics.
The Android library project moved to the Github SymjaAndroid repository.
Note: this repository contains the Java 8 project. The NCalc project maintains a Java 7 branch based on Retrolambda.
Features:
- arbitrary precision integers, rational and complex numbers
- differentiation, integration, polynomial and linear algebra 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 "Getting started with Symja" document.
- see the Unit test examples
Join the chat at: Gitter Symja
Online demo:
Android Apps which use the Symja library on Google play store:
- Natural Calculator https://play.google.com/store/apps/details?id=com.nstudio.calc.casio (on Github)
- NCalc https://play.google.com/store/apps/details?id=com.duy.calculator.free (on Github)
- MathSolver - https://play.google.com/store/apps/details?id=com.shakti.mathssolver
- Math DragOn - https://play.google.com/store/apps/details?id=org.teaminfty.math_dragon (on Github)
Misc links
- Seco - Advanced Scripting IDE for JVM based languages (on Github)
- Git mirror of this repository (on Github)
Examples
Include the latest symja_java8-YYYY-MM-DD.jar from the Downloads section in your classpath and start coding using parsed input strings or the internal object hierarchy.
- Calculus example
- Assumptions example
- MathML output example
- LaTeX output example
- Load user-defined rules from a package on startup
- Example for listening to the evaluation steps
With the following command you can run a symja console from the command line
java -classpath symja_java8-YYYY-MM-DD.jar org.matheclipse.core.eval.Console
With the following command you can run a symja console with a Mathematica-compatible syntax and functions
java -classpath symja_java8-YYYY-MM-DD.jar org.matheclipse.core.eval.MMAConsole
Maven Usage
Using Maven, add the following to your `pom.xml`
<dependencies>
<dependency>
<groupId>org.matheclipse</groupId>
<artifactId>matheclipse-core</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>jas-repository</id>
<url>http://krum.rz.uni-mannheim.de/maven-repository</url>
</repository>
<repository>
<id>Lab4Inf</id>
<url>http://www.lab4inf.fh-muenster.de/lab4inf/maven-repository</url>
</repository>
</repositories>
and run
mvn clean install
With the following command you can run the Symja console from the command line
mvn exec:java -pl matheclipse-core
With the following command you can build a fat jar which contains all needed classes
mvn assembly:single -pl matheclipse-core
The *Excelsior JET Maven Plugin* provides Maven users with an easy way to compile their applications down to optimized native Windows, OS X, or Linux executables with Excelsior JET.
mvn jet:build -pl matheclipse-core
Used Libraries
The Symja library uses the Apache Commons Mathematics Library:
and the Apfloat - Java high performance arbitrary precision arithmetic library
and the JAS - Java Algebra System:
Related GIT Repositories
Symja is the underlying library for the following projects:
- Symja AJAX web interface: https://github.com/axkr/symja_web
- Symja beaker-notebook plugin https://bitbucket.org/axelclk/beaker-plugin/src/master/symja/
- Symja Java Swing GUI: https://bitbucket.org/axelclk/symjaswing
- SymjaDroid Android app for testing the Symja library on Android https://bitbucket.org/axelclk/symjadroidapp
- Rubi (Symbolic Integration Rules) to Symja Java converter https://github.com/axkr/rubi
License
- 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 Apache Commons Mathematics Library is published under Apache software licence
- the Hipparchus Mathematics Library is published under Apache software licence
- the Symja parser libraries (org.matheclipse.parser* packages) are published under the APACHE LICENSE Version 2.0.
- Contact: axelclk_AT_gmail_DOT_com
- Flattr this
Updated