Questions tagged [mathjs]

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.

Math JS Site

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 solution to work with numbers, big numbers, complex numbers, units, and matrices. Powerful and easy to use.

Features

-Supports numbers, big numbers, 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

98 questions
0
votes
2 answers

Precision decimals, 30 of them, in JavaScript (Node.js)

My Challenge I am presently working my way through reddit's /r/dailyprogrammer challenges using Node.js and have caught a snag. Being that I'm finishing out day 3 with this single exercise, I've decided to look for help. I refuse to just move on…
bitfed
  • 347
  • 4
  • 11
0
votes
3 answers

Converting a string of comma separated numbers into numbers

I am trying get a list of comma separated numbers to process in math.js library (https://github.com/josdejong/mathjs/blob/master/docs/functions.md) in Node.js. While I got the list list of numbers like "2,4,5" and did a comma split to store in an…
user2714639
  • 57
  • 1
  • 7
0
votes
1 answer

Is Math.js capable of evaluating expressions in a topological order ?

math.eval(["c = b" , "a = b + c"] , {"a" : 1, "b" : 2}) [2, 4] Switching the order of the expressions, math.eval(["a = b + c" , "c = b"] , {"a" : 1, "b" : 2}) Error: Undefined symbol c Setting initial value for c to NaN math.eval(["a = b + c" , "c…
haki
  • 9,389
  • 15
  • 62
  • 110
-1
votes
2 answers

cannot use function from js in typescript

i have a function to calculate area of polygon, and here's my function import {distance} from "mathjs" function getArea(arrayCord) { let triangle =[] let area = 0.0 let a =0.0 let b =0.0 let c =0.0 let s =0.0 for (let i =…
deb97
  • 61
  • 1
  • 6
-1
votes
5 answers

Random image from html on button click

I am trying to make a script that will take the images from one div element and put it to div rndmImage randomly on button click, I should see images when document is loaded, but the new div where images should go after click must be empty until…
Alex
  • 19
  • 3
-1
votes
1 answer

SumProduct multi dimensional array using mathJS

I have some working code, which I wrote a while ago, where I created my own sumProduct functions, for performing this operation on singe and multi dimensional arrays: function sumProduct1D(m1, m2) { var result = 0; var len = m1.length; …
Jamiec
  • 133,658
  • 13
  • 134
  • 193
-2
votes
1 answer

equation javascript calculating

I have code: