• Stars
    star
    911
  • Rank 50,145 (Top 1.0 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Computer Algebra System in Javascript (Typescript)

algebrite header

npm version

Algebrite is a Javascript (Typescript) library for symbolic mathematics designed to be comprehensible and easily extensible.

var Algebrite = require('algebrite')

Algebrite.run('x + x') // => "2 x"

Algebrite.factor('10!').toString() // => "2^8 3^4 5^2 7"

Algebrite.eval('integral(x^2)').toString() // => "1/3 x^3"

// composing...
Algebrite.integral(Algebrite.eval('x')).toString() // => "1/2 x^2"

Features

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!

Examples and manual

Please refer to http://algebrite.org/

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.

The cons objects have a toString method which converts it into a pretty-print notation.

How to build

For a build to run tests:

  1. make sure npm is installed, then:
  2. npm install
  3. bazelisk build algebrite

(bazelisk is the launcher for the bazel build system). The bazel build system tends to be smart and cache things. You can do a thorough clean by:

bazelisk clean; rm -rf ./dist/*

The so called "npm build" does a build for npm and browser:

  1. make sure npm is installed, then:
  2. npm install (if you didn't run this already)
  3. bazelisk build npm
  4. open index.html

How to test

For full tests:

bazelisk test :all

or, if caches get in the way:

bazelisk test :all --cache_test_results=no

Contribute

please take a look at the contributing file.

References

Algebrite starts as an adaptation of the EigenMath CAS by George Weigt. Also you might want to check another fork of EigenMath: SMIB by Philippe Billet.

Another CAS of similar nature is SymPy made in Python.

Three other Javascript CAS are

  • javascript-cas by Anthony Foster supporting "differentiation, complex numbers, sums, vectors (dot products, cross products, gradient/curl etc)"
  • Coffeequate by Matthew Alger supporting "quadratic and linear equations, simplification of most algebraic expressions, uncertainties propagation, substitutions, variables, constants, and symbolic constants".
  • Algebra.js by Nicole White which among other things can build and solve equations via a "chainable" API.

More Repositories

1

livecodelab

a web based livecoding environment
CoffeeScript
322
star
2

Fizzygum

a new web framework, an entire platform really, designed from the ground up to handle complex things easily. Put the power of an entire Operating System at your fingertips.
CoffeeScript
118
star
3

Ascii-fluid-simulation-deobfuscated

the best de-obfuscated version of Yusuke Endoh's "Most complex ASCII fluid" obfuscated C code competition 2012 entry
C
61
star
4

P5Nitro

P5Nitro turns your processing sketches into C++ code that runs at native speed
Java
26
star
5

A-thousand-notes

In Jan 2021 I moved around 29k notes from Evernote to markdown. These are the scripts I used to clean-up, validate, maintain the markdown notes.
Python
20
star
6

raspberry-pi-autoVj

automatic motion graphics for raspberry pi using pi3d framework
Python
13
star
7

QR-and-JIRA-check-in-check-out-system

a QR system to make check-ins and check-out of things like mobile phones, laptops, any item really, using JIRA
CSS
10
star
8

The-Shazam-Equation

9
star
9

sketchPatch

online fun programming sketchbook
JavaScript
9
star
10

Basic-fluid-simulation-in-the-browser

basic fluid simulations in the browser using the Smoothed-particle hydrodynamics (SPH) method. Based on Yusuke Endoh's "Most complex ASCII fluid" obfuscated C code competition 2012 entry.
CoffeeScript
6
star
11

Fizzylogo

an object-oriented logo made in Coffeescript (Javascript)
JavaScript
5
star
12

Scraping-the-web-directly-from-the-browser-with-YQL

Scraping the web directly from the browser with YQL - tiny version of https://github.com/codepo8/crossdomain-ajax-with-jquery-and-yql by Christian Heilmann
5
star
13

using-dat-gui-with-processing-js

A simple example of using dat.GUI with Processing.js
JavaScript
4
star
14

JIRA-multi-board-view

shows issues spread across multiple JIRA boards
HTML
4
star
15

EigenMath-unofficial-clone-repo

EigenMath unofficial clone repo. Just a work area for Algebrite-related code. Please refer to official svn repo by Gerge Weigt instead.
C++
3
star
16

javascript4P5

a port of javascript4me for Processing i.e. a javascript interpreter for Processing
C++
3
star
17

Rapture-index-dashboard

essential dashboard of end-of-time activity
HTML
2
star
18

Fizzygum-website

Fizzygum's website. Not much to star or follow here.
JavaScript
2
star
19

CellularAutomataOfxApp

a simple cellular automata app done in OpenFrameworks. Why not?
C++
2
star
20

Chisana-Fukei-Little-landscapes

little procedural landscapes
Processing
2
star
21

P5Lint

processing syntax checker done in javascript
JavaScript
2
star
22

Die-and-matchsticks-simulator

A small simulator of the "die and matchsticks" game from Eliyahu M. Goldratt's "The Goal"
Nim
2
star
23

tiny-renderer-coffee

port of Dmitry V. Sokolov's tiny renderer to CoffeeScript
HTML
2
star
24

The-strangest-things-in-your-pics

finding strange objects in your pictures using Inception3 deep convolution neural network by Google
Shell
2
star
25

Fizzygum-builds

Fizzygum builds ready to be served (via github or any other server). Builds include tests.
1
star
26

livecodelang

JavaScript
1
star
27

floradavide.com

HTML
1
star
28

Processing-UI-only-made-of-links

Attempt to build a UI that is only made of links.
Java
1
star
29

Algebrite-website

website for the Algebrite Computer Algebra System
HTML
1
star
30

Smaller-screenshots

automatically get a range of smaller candidate formats/sizes for your (big) screenshots.
Shell
1
star
31

Algebrite-reference-generator

generates reference documentation for Algebrite
HTML
1
star
32

Pulover-macro-creator---useful-macros

a collection of macros for generic productivity improvement (improved windows management, Evernote, etc.)
1
star
33

JS-Pixel-identical-crisp-text-renderer

CoffeeScript
1
star
34

Lovr-sketches

some sketches. Made with Lovr
MoonScript
1
star
35

Rapture-index-cors-api

API for fetching the latest Rapture Index data (CORS-enabled so you can fetch directly from the browser, from any page you want served from any domain you want)
Python
1
star
36

LiveCodeLab-the-website

just the website. For LCL dev see the other dedicated repo.
JavaScript
1
star
37

vivarium

CoffeeScript
1
star
38

jsonp-db-redux

JSON-P DB Redux is a minimal Google App Engine app to persist/retrieve JSON objects via simple client-side javascript JSON-P calls.
Python
1
star