MCPcopy Index your code
hub / github.com/axkr/symja_android_library

github.com/axkr/symja_android_library @commons-math-3.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release commons-math-3.6 ↗ · + Follow
14,481 symbols 64,046 edges 1,499 files 8,621 documented · 60%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Symja Library - Java Symbolic Math System

Note: this repository contains the Java 8 project. The Android library project can be found in the SymjaAndroid repository.

Features:

  • arbitrary precision integers, rational and complex numbers
  • differentiation, integration, equation solving, 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.

Online demo:

Quick start

Include the latest symja_java8-YYYY-MM-DD.jar from the Downloads/Release section in your classpath and start coding using parsed input strings or the internal object hierarchy.

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

Examples

Console Examples

>>> 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)

Getting started

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

You can find JDK installers at:

  • http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

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

  • https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html

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

Install and open the latest version of the Eclipse development IDE:

  • http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/mars1

BitBucket GIT

a) Fork the Symja repository to use as a starting point.

  • Navigate to https://bitbucket.org/axelclk/symja_android_library/fork 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 BitBucket 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 also the "Getting started with Symja" document on the BitBucket Wiki pages:

Contact

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

License

  • the Symja source code is published under the LESSER GNU GENERAL PUBLIC LICENSE Version 3

Extension points exported contracts — how you extend this code

IDoubleCallbackFunction (Interface)
A call back function which could be used in DoubleEvaluator , for evaluating user-defined functions. [401 implementers]
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/parser/client/eval/IDoubleCallbackFunction.java
RelationGenerator (Interface)
Generate Relation Tables for solvable polynomial rings. Adds the respective relations to the relation table of the given [11 …
symja_android_library/jas/src/main/java/edu/jas/poly/RelationGenerator.java
RecurrenceCoefficientsGenerator (Interface)
Interface for recurrence coefficients generation. [11 implementers]
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/polynomials/PolynomialsUtils.java
UnivPowerSeriesMap (Interface)
Univariate power series map interface. Defines method for mapping of power series. @param ring element type @author [13 …
symja_android_library/jas/src/main/java/edu/jas/ps/UnivPowerSeriesMap.java
IConverter (Interface)
General conversion interface [65 implementers]
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/form/output/IConverter.java
MultiVarPowerSeriesMap (Interface)
Multivariate power series map interface. Defines method for mapping of power series. @param ring element type @autho [13 …
symja_android_library/jas/src/main/java/edu/jas/ps/MultiVarPowerSeriesMap.java
IConverter (Interface)
General conversion interface [66 implementers]
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/form/mathml/IConverter.java
ModGroebnerBase (Interface)
Module Groebner Bases interface. Defines Groebner bases and GB test. @author Heinz Kredel @deprecated use respective met [11 …
symja_android_library/jas/src/main/java/edu/jas/gbmod/ModGroebnerBase.java

Core symbols most depended-on inside this repo

Times
called by 89281
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java
Plus
called by 64838
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java
Power
called by 40498
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java
And
called by 16402
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java
Sqr
called by 15654
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java
Int
called by 10721
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/integrate/rubi45/UtilityFunctionCtors.java
Negate
called by 8071
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java
$s
called by 7951
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java

Shape

Method 12,739
Class 1,561
Interface 165
Enum 16

Languages

Java100%

Modules by API surface

symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/MainTestCase.java462 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java344 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/integrate/rubi45/UtilityFunctionCtors.java326 symbols
symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/LowercaseTestCase.java315 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/AbstractAST.java208 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/interfaces/IExpr.java181 symbols
symja_android_library/jas/src/main/java/edu/jas/poly/PolyUtil.java146 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/EvalEngine.java91 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/Symbol.java78 symbols
symja_android_library/jas/src/main/java/edu/jas/poly/ExpVector.java76 symbols
symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/polynomials/ExprPolynomial.java75 symbols
symja_android_library/jas/src/main/java/edu/jas/arith/BigRational.java75 symbols

For agents

$ claude mcp add symja_android_library \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact