Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicolewhite/algebra.js
Build, display, and solve algebraic equations.
https://github.com/nicolewhite/algebra.js
algebra javascript
Last synced: 3 months ago
JSON representation
Build, display, and solve algebraic equations.
- Host: GitHub
- URL: https://github.com/nicolewhite/algebra.js
- Owner: nicolewhite
- License: mit
- Archived: true
- Created: 2015-05-05T10:37:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T22:43:51.000Z (over 5 years ago)
- Last Synced: 2024-09-22T03:32:49.074Z (3 months ago)
- Topics: algebra, javascript
- Language: JavaScript
- Homepage: http://algebra.js.org
- Size: 529 KB
- Stars: 1,340
- Watchers: 45
- Forks: 112
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# algebra.js
[![Build Status](https://travis-ci.org/nicolewhite/algebra.js.svg?branch=master)](https://travis-ci.org/nicolewhite/algebra.js)
[![Coverage Status](https://coveralls.io/repos/nicolewhite/algebra.js/badge.svg?branch=master)](https://coveralls.io/r/nicolewhite/algebra.js?branch=master)
[![npm version](https://badge.fury.io/js/algebra.js.svg)](http://badge.fury.io/js/algebra.js)
[![Join the chat at https://gitter.im/nicolewhite/algebra.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nicolewhite/algebra.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)## Quick Start
```js
var expr = new Expression("x");
expr = expr.subtract(3);
expr = expr.add("x");console.log(expr.toString());
``````
2x - 3
``````js
var eq = new Equation(expr, 4);console.log(eq.toString());
``````
2x - 3 = 4
``````js
var x = eq.solveFor("x");console.log("x = " + x.toString());
``````
x = 7/2
```[Read the full documentation at the project site](http://algebra.js.org).
## Install
### Stable Release
#### In Node
```
npm install algebra.js
```#### In the Browser
Download [algebra.min.js](http://algebra.js.org/javascripts/algebra-0.2.6.min.js).
### Latest Development Release
```
git clone https://github.com/nicolewhite/algebra.js.git
cd algebra.js
```#### In Node
```js
var algebra = require("./algebra");
```#### In the Browser
The following will build `algebra.js` in the `build` directory.
```
make bundle
```The following will build `algebra.min.js` in the `build` directory.
```
make minify
```