Skip to content

shannonrothe/Coffeequate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffeequate v1.1.0

A computer algebra system for JavaScript. More information at the webpage.

Installation

Include Coffeequate with an AMD loader, or load it into a <script> tag.

require.config({
    paths: {
      "coffeequate": "coffeequate.min"
    }
});
<script src="coffeequate.min.js"></script>

Use

Coffeequate gives you a CQ function which wraps the functionality of Coffeequate. An alias of this function is coffeequate.

To make a new expression, just call CQ:

expr = CQ("m * c**2");

You can also make an expression with equation syntax, as follows:

expr = CQ("E = m * c**2");

All expressions will be equated to zero.

The formatting of these strings must be as follows: You can use * for multiplication, ** for exponentiation, + for addition, - for negation or subtraction, / for division, and () parentheses to change the order of operations. Negation and parenthesising are higher precedence than exponentiation, which is higher precedence than multiplication and division, which are higher precedence than addition and subtraction.

Terminals can be numbers, variables, or symbolic constants - the latter are entered with a backslash, for example, \G or . Note that if you are entering this as a string, you will have to escape the backslash (e.g., CQ("\\π * r**2")).

License

All current and previous versions licensed under the MIT License. See /LICENSE for a copy of this license.

About

Computer algebra system for JavaScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 85.6%
  • JavaScript 12.9%
  • Other 1.5%