1 | <img src="https://raw.githubusercontent.com/davidedc/Algebrite/941de5515ec57baee3f5d2bacbd4db2ee382c461/readme-images/algebrite-logo-for-readme.png" width="150px" alt="algebrite header"/>
|
2 |
|
3 | [![npm version](https://badge.fury.io/js/algebrite.svg)](https://badge.fury.io/js/algebrite)
|
4 |
|
5 | Algebrite is a Javascript library for symbolic mathematics (technically, CoffeeScript) designed to be comprehensible and easily extensible.
|
6 |
|
7 |
|
8 | ```js
|
9 | var Algebrite = require('algebrite')
|
10 |
|
11 | Algebrite.run('x + x') // => "2 x"
|
12 |
|
13 | Algebrite.factor('10!').toString() // => "2^8 3^4 5^2 7"
|
14 |
|
15 | Algebrite.eval('integral(x^2)').toString() // => "1/3 x^3"
|
16 |
|
17 | // composing...
|
18 | Algebrite.integral(Algebrite.eval('x')).toString() // => "1/2 x^2"
|
19 | ```
|
20 |
|
21 | # Features
|
22 |
|
23 | Algebrite supports: arbitrary-precision arithmetic, complex quantities, simplification, expansion , substitution, symbolic and numeric roots, units of measurement, matrices, derivatives and gradients, tensors, integrals, multi-integrals, computing integrals and much more!
|
24 |
|
25 | # Examples and manual
|
26 |
|
27 | Please refer to [http://algebrite.org/](http://algebrite.org/)
|
28 |
|
29 | All the built-in methods in Algebrite are exposed through a javascript interface. Strings are automatically parsed as expressions, numbers are converted into the appropriate representation, and the internal cons objects are returned.
|
30 |
|
31 | The cons objects have a `toString` method which converts it into a pretty-print notation.
|
32 |
|
33 | # How to build
|
34 |
|
35 | For node use:
|
36 |
|
37 | 1. make sure npm is installed
|
38 | 2. ```npm install```
|
39 | 3. ```npm run build```
|
40 |
|
41 | To debug things, better use the debugger from Chrome, so build for the browser like so:
|
42 |
|
43 | 1. make sure npm is installed
|
44 | 2. make sure browserify is installed
|
45 | 3. ```npm install```
|
46 | 4. ```npm run build-for-browser```
|
47 | 5. open ```index.html```
|
48 |
|
49 | # How to test
|
50 |
|
51 | For full tests:
|
52 |
|
53 | ```
|
54 | npm test
|
55 | ```
|
56 |
|
57 | For the subset of tests in run-micro-tests.coffee:
|
58 |
|
59 | ```
|
60 | npm run microtest
|
61 | ```
|
62 |
|
63 | # Contribute
|
64 | please take a look at the [contributing](https://github.com/davidedc/Algebrite/blob/master/contributing.md) file.
|
65 |
|
66 | # References
|
67 |
|
68 | Algebrite starts as an adaptation of [the EigenMath CAS by George Weigt](http://eigenmath.sourceforge.net/Eigenmath.pdf). Also you might want to check another fork of EigenMath: [SMIB by Philippe Billet](http://smib.sourceforge.net/).
|
69 |
|
70 | Another CAS of similar nature is [SymPy](http://www.sympy.org/en/index.html) made in Python.
|
71 |
|
72 | Three other Javascript CAS are
|
73 |
|
74 | * [javascript-cas by Anthony Foster](https://github.com/aantthony/javascript-cas) supporting "differentiation, complex numbers, sums, vectors (dot products, cross products, gradient/curl etc)"
|
75 | * [Coffeequate by Matthew Alger](http://coffeequate.readthedocs.org/) supporting "quadratic and linear equations, simplification of most algebraic expressions, uncertainties propagation, substitutions, variables, constants, and symbolic constants".
|
76 | * [Algebra.js by Nicole White](http://algebra.js.org) which among other things can build and solve equations via a "chainable" API.
|
77 |
|
78 |
|
79 | # The MIT License (MIT)
|
80 |
|
81 | Copyright © `2016` `all algebrite contributors`
|
82 |
|
83 | Permission is hereby granted, free of charge, to any person
|
84 | obtaining a copy of this software and associated documentation
|
85 | files (the “Software”), to deal in the Software without
|
86 | restriction, including without limitation the rights to use,
|
87 | copy, modify, merge, publish, distribute, sublicense, and/or sell
|
88 | copies of the Software, and to permit persons to whom the
|
89 | Software is furnished to do so, subject to the following
|
90 | conditions:
|
91 |
|
92 | The above copyright notice and this permission notice shall be
|
93 | included in all copies or substantial portions of the Software.
|
94 |
|
95 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
96 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
97 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
98 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
99 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
100 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
101 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
102 | OTHER DEALINGS IN THE SOFTWARE.
|
103 |
|
\ | No newline at end of file |