All Projects → axkr → Symja_android_library

axkr / Symja_android_library

Licence: gpl-3.0
☕️ Symja - computer algebra language & symbolic math library. A collection of popular algorithms implemented in pure Java.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Symja android library

Newton Api
➗ A really micro micro-service for advanced math.
Stars: ✭ 358 (+110.59%)
Mutual labels:  json, algebra, calculus
Angourimath
Open-source symbolic algebra library for C# and F#. One of the most powerful in .NET
Stars: ✭ 266 (+56.47%)
Mutual labels:  algebra, computer-algebra, calculus
Nerdamer
a symbolic math expression evaluator for javascript
Stars: ✭ 322 (+89.41%)
Mutual labels:  algebra, calculus
Gap
Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
Stars: ✭ 447 (+162.94%)
Mutual labels:  algebra, computer-algebra
Ncalc
Power calculator for Android. Solve some problem algebra and calculus.
Stars: ✭ 512 (+201.18%)
Mutual labels:  algebra, calculus
Basic Mathematics For Machine Learning
The motive behind Creating this repo is to feel the fear of mathematics and do what ever you want to do in Machine Learning , Deep Learning and other fields of AI
Stars: ✭ 300 (+76.47%)
Mutual labels:  algebra, calculus
Expreduce
An experimental computer algebra system written in Go
Stars: ✭ 318 (+87.06%)
Mutual labels:  computer-algebra, calculus
Gravity
Gravity Programming Language
Stars: ✭ 3,968 (+2234.12%)
Mutual labels:  json, interpreter
Internettools
XPath/XQuery 3.1 interpreter for Pascal with compatibility modes for XPath 2.0/XQuery 1.0/3.0, custom and JSONiq extensions, XML/HTML parsers and classes for HTTP/S requests
Stars: ✭ 82 (-51.76%)
Mutual labels:  json, interpreter
Stanford Cme 102 Ordinary Differential Equations
VIP cheatsheets for Stanford's CME 102 Ordinary Differential Equations for Engineers
Stars: ✭ 109 (-35.88%)
Mutual labels:  algebra, calculus
Sage
Mirror of the Sage source tree -- please do not submit PRs here -- everything must be submitted via https://trac.sagemath.org/
Stars: ✭ 1,656 (+874.12%)
Mutual labels:  algorithms, computer-algebra
Grassmann.jl
⟨Leibniz-Grassmann-Clifford⟩ differential geometric algebra / multivector simplicial complex
Stars: ✭ 289 (+70%)
Mutual labels:  algebra, computer-algebra
Rascal
The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Stars: ✭ 284 (+67.06%)
Mutual labels:  pattern-matching, interpreter
Mlib
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
Stars: ✭ 321 (+88.82%)
Mutual labels:  algorithms, json
Eval
Eval is a lightweight interpreter framework written in Swift, evaluating expressions at runtime
Stars: ✭ 157 (-7.65%)
Mutual labels:  pattern-matching, interpreter
Bracmat
Programming language for symbolic computation with unusual combination of pattern matching features: Tree patterns, associative patterns and expressions embedded in patterns.
Stars: ✭ 42 (-75.29%)
Mutual labels:  computer-algebra, pattern-matching
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (-83.53%)
Mutual labels:  calculus, algebra
Symbolic-computation-Python
Symbolic computation using SymPy and various applications
Stars: ✭ 18 (-89.41%)
Mutual labels:  calculus, algebra
Algebrite
Computer Algebra System in Javascript (Coffeescript)
Stars: ✭ 800 (+370.59%)
Mutual labels:  algebra, computer-algebra
Numbas
A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
Stars: ✭ 144 (-15.29%)
Mutual labels:  algebra, computer-algebra

Symja Library - Java Symbolic Math System for Android NCalc calculator

Note: this repository contains the Java 8 version of the project. The NCalc Android calculator project maintains a Java 7 Android branch of the Android *.AAR library.

Try the Android or iOS apps:

Google Play App Store

or help testing the latest Android BETA version or the web demo at matheclipse.org.

Read the Symja Manual for the description of the Symja language or browse the available functions. We encourage everyone to participate in our Wiki.

Gitpod ready-to-code Join the chat at https://gitter.im/symja_android_library/Lobby LGTM Alerts

Installation

The different kinds of installations are described in the Wiki Installation.

Features

Features of the Symja language:

Applications

Examples

To get an idea of the kinds of expressions Symja handles, see the tests in this file.

Console Examples

Web Examples

Solve({x^2==4,x+y^2==6}, {x,y})

FactorInteger(2^15-5)

D(Sin(x^3), x)

Factor(-1+x^16)

Manipulate(Plot3D(Sin(a * x * y), {x, -1.5, 1.5}, {y, -1.5, 1.5}), {a,1,5})

Plot(Piecewise({{x^2, x < 0}, {x, x >= 0&&x<1},{Cos(x-1), x >= 1}}), {x, -2, 12})

Refine(Abs(n*Abs(m)),n<0)

Inverse({{1,2},{3,4}})

Det({{1,2},{3,4}})

Integrate(Cos(x)^5, x)

A Java usage example:

package org.matheclipse.core.examples;

import org.matheclipse.core.eval.ExprEvaluator;
import org.matheclipse.core.expression.F;
import org.matheclipse.core.interfaces.IAST;
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.ISymbol;
import org.matheclipse.parser.client.SyntaxError;
import org.matheclipse.parser.client.math.MathException;

public class Example {
	public static void main(String[] args) {
		try {
			ExprEvaluator util = new ExprEvaluator(false, 100);

			// Convert an expression to the internal Java form:
			// Note: single character identifiers are case sensitive
			// (the "D()" function identifier must be written as upper case
			// character)
			String javaForm = util.toJavaForm("D(sin(x)*cos(x),x)");
			// prints: D(Times(Sin(x),Cos(x)),x)
			System.out.println("Out[1]: " + javaForm.toString());

			// Use the Java form to create an expression with F.* static
			// methods:
			ISymbol x = F.Dummy("x");
			IAST function = F.D(F.Times(F.Sin(x), F.Cos(x)), x);
			IExpr result = util.eval(function);
			// print: Cos(x)^2-Sin(x)^2
			System.out.println("Out[2]: " + result.toString());

			// Note "diff" is an alias for the "D" function
			result = util.eval("diff(sin(x)*cos(x),x)");
			// print: Cos(x)^2-Sin(x)^2
			System.out.println("Out[3]: " + result.toString());

			// evaluate the last result (% contains "last answer")
			result = util.eval("%+cos(x)^2");
			// print: 2*Cos(x)^2-Sin(x)^2
			System.out.println("Out[4]: " + result.toString());

			// evaluate an Integrate[] expression
			result = util.eval("integrate(sin(x)^5,x)");
			// print: 2/3*Cos(x)^3-1/5*Cos(x)^5-Cos(x)
			System.out.println("Out[5]: " + result.toString());

			// set the value of a variable "a" to 10
			result = util.eval("a=10");
			// print: 10
			System.out.println("Out[6]: " + result.toString());

			// do a calculation with variable "a"
			result = util.eval("a*3+b");
			// print: 30+b
			System.out.println("Out[7]: " + result.toString());

			// Do a calculation in "numeric mode" with the N() function
			// Note: single character identifiers are case sensistive
			// (the "N()" function identifier must be written as upper case
			// character)
			result = util.eval("N(sinh(5))");
			// print: 74.20321057778875
			System.out.println("Out[8]: " + result.toString());

			// define a function with a recursive factorial function definition.
			// Note: fac(0) is the stop condition.
			result = util.eval("fac(x_Integer):=x*fac(x-1);fac(0)=1");
			// now calculate factorial of 10:
			result = util.eval("fac(10)");
			// print: 3628800
			System.out.println("Out[9]: " + result.toString());

			function = F.Function(F.Divide(F.Gamma(F.Plus(F.C1, F.Slot1)), F.Gamma(F.Plus(F.C1, F.Slot2))));
			// eval function ( Gamma(1+#1)/Gamma(1+#2) ) & [23,20]
			result = util.evalFunction(function, "23", "20");
			// print: 10626
			System.out.println("Out[10]: " + result.toString());
		} catch (SyntaxError e) {
			// catch Symja parser errors here
			System.out.println(e.getMessage());
		} catch (MathException me) {
			// catch Symja math errors here
			System.out.println(me.getMessage());
		} catch (final Exception ex) {
			System.out.println(ex.getMessage());
		} catch (final StackOverflowError soe) {
			System.out.println(soe.getMessage());
		} catch (final OutOfMemoryError oome) {
			System.out.println(oome.getMessage());
		}
	}
}

Maven Usage

How to use Maven is described in the Maven wiki page.

Getting started

First, you'll need a Java Development Kit compatible with Java 8 or later.

You can find JDK installers at:

If you're unsure how to install the JDK, you can find instructions for all operating systems here:

Pay careful attention to anything about setting up your PATH or CLASSPATH.

Install and open the latest version of the Eclipse development IDE for Java Developers:

Github GIT

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 Eclipse workspace.

  • Open Eclipse and select the "File -> Import..." menu item.
  • Select "Git -> Projects from Git", and click "Next >".
  • Select "URI" and click "Next >".
  • Enter your repository's clone URL in the "URI" field. The remaining fields in the "Location" and "Connection" groups will get automatically filled in.
  • Enter your Github credentials in the "Authentication" group, and click "Next >".
  • Select the master branch on the next screen, and click "Next >".
  • The default settings on the "Local Configuration" screen should work fine, click "Next >".
  • Make sure "Import existing projects" is selected, and click "Next >".
  • Eclipse should find and select the symja_android_library automatically, click "Finish".

See this Git version control with Eclipse (EGit) - Tutorial for a general overview.

Contact

If you have any questions about using or developing for this project, send me an email!

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 some of the associated Java licenses:

  • the apfloat project is published under the (LESSER) GNU GENERAL PUBLIC LICENSE license.
  • the Hipparchus Mathematics Library is published under the Apache software license
  • the JAS Java Algebra System is published under the (LESSER) GNU GENERAL PUBLIC LICENSE license. The Java bytecode is dual licenced also under the Apache 2.0 license to allow usage in Android projects.
  • the JGraphT Library is published under the Eclipse Public License (EPL) or (LESSER) GNU GENERAL PUBLIC LICENSE license.
  • the LogicNG project is published under the Apache software license
  • the Tablesaw is published under the Apache software license
  • the Symja parser libraries (org.matheclipse.parser* packages) are published under the APACHE LICENSE Version 2.0.

Here are some of the associated JavaScript licenses:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].