mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
updated the math.js library, improved formatting
This commit is contained in:
parent
139c108782
commit
b0a5829e09
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>math.js - an extensive math library for JavaScript and Node.js</title>
|
||||
<title>math.js | an extensive math library for JavaScript and Node.js</title>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta name="title" content="math.js">
|
||||
|
||||
@ -73,7 +73,7 @@ pre code,
|
||||
}
|
||||
|
||||
#example .keyword {
|
||||
color: rgb(0,78,208);
|
||||
color: #004ED0;
|
||||
}
|
||||
#example .string {
|
||||
color: orange;
|
||||
|
||||
11
index.md
11
index.md
@ -7,18 +7,19 @@ title: Home
|
||||
|
||||
Math.js is an extensive math library for JavaScript and Node.js.
|
||||
It features real and complex numbers, units, matrices, a large set of
|
||||
mathematical functions, and a flexible expression parser.
|
||||
mathematical functions, and a flexible expression parser. Math.js is
|
||||
powerful and easy to use.
|
||||
|
||||
|
||||
# Features
|
||||
|
||||
- Supports real and complex numbers, units, strings, arrays\*, and
|
||||
matrices\*.
|
||||
- Supports numbers, complex numbers, units, strings, arrays\*, and matrices\*.
|
||||
- Contains a large set of built-in functions and constants.
|
||||
- Contains a flexible expression parser.
|
||||
- Compatible with JavaScript’s built-in Math library.
|
||||
- No dependencies. Runs on any JavaScript engine.
|
||||
- Easily extensible.
|
||||
- Compatible with JavaScript's built-in Math library.
|
||||
- Powerful and easy to use.
|
||||
|
||||
|
||||
*\* Note: arrays and matrices are to be implemented.*
|
||||
|
||||
|
||||
@ -454,10 +454,7 @@ function CommandLineEditor (params) {
|
||||
|
||||
var res;
|
||||
try {
|
||||
res = parser.eval(expr);
|
||||
if ((res instanceof Number) || (typeof res == 'number')) {
|
||||
res = math.round(res, 9);
|
||||
}
|
||||
res = math.format(parser.eval(expr));
|
||||
}
|
||||
catch (err) {
|
||||
res = err.toString();
|
||||
|
||||
913
js/lib/math.js
913
js/lib/math.js
File diff suppressed because it is too large
Load Diff
22
js/lib/math.min.js
vendored
22
js/lib/math.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user