MathJs
 
官方网址:http://mathjs.org/
An extensive math library for JavaScript and Node.js
Math.js is an extensive math library for JavaScript and Node.js.It features a flexible expression parser and offers an integrated solutionto work with numbers, big numbers, complex numbers, units, and matrices.Powerful and easy to use.
Features
- Supports numbers, big numbers, fractions, complex numbers, units, strings, arrays, and matrices.
- Is compatible with JavaScript’s built-in Math library.
- Contains a flexible expression parser.
- Supports chained operations.
- Comes with a large set of built-in functions and constants.
- Has no dependencies. Runs on any JavaScript engine.
- Is easily extensible.
- Open source.
- <!DOCTYPE HTML>
- <html>
- <head>
-   <script src="math.js" type="text/javascript"></script>
- </head>
- <body>
-   <script type="text/javascript">
-     // use math.js
-     math.sqrt(-4); // 2i
-   </script>
- </body>
- </html>
-  
更多函数示例:
- // functions and constants
- math.round(math.e, 3);            // 2.718
- math.atan2(3, -3) / math.pi;      // 0.75
- math.log(10000, 10);              // 4
- math.sqrt(-4);                    // 2i
- math.pow([[-1, 2], [3, 1]], 2);
-      // [[7, 0], [0, 7]]
-  
- // expressions
- math.eval('1.2 * (2 + 4.5)');     // 7.8
- math.eval('5.08 cm to inch');     // 2 inch
- math.eval('sin(45 deg) ^ 2');     // 0.5
- math.eval('9 / 3 + 2i');          // 3 + 2i
- math.eval('det([-1, 2; 3, 1])');  // -7
-  
- // chaining
- math.chain(3)
-     .add(4)
-     .multiply(2)
-     .done(); // 14
-  

 
                
![战神引擎传奇手游【黯晶灭世[白猪3.1]】最新整理Win系特色服务端+安卓苹果双端+GM授权后台+详细搭建教程](https://cdn.jxasp.com:9143/image/20251028/0F2E0E55BA6157D5F76B8125D0A511AC.jpg)
















