3 Star 0 Fork 0

Gitee 极速下载 / algebrite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/davidedc/Algebrite
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT
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.
MIT License Copyright (c) 2017 all Algebrite contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/algebrite.git
git@gitee.com:mirrors/algebrite.git
mirrors
algebrite
algebrite
master

搜索帮助