UNPKG

mathjs

Version:

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.

22 lines (19 loc) 635 B
module.exports = function (math) { var collection = require('../../type/collection'); /** * Divide two values element wise. * * x ./ y * edivide(x, y) * * @param {Number | BigNumber | Boolean | Complex | Unit | Array | Matrix} x * @param {Number | BigNumber | Boolean | Complex | Unit | Array | Matrix} y * @return {Number | BigNumber | Complex | Unit | Array | Matrix} res */ math.edivide = function edivide(x, y) { if (arguments.length != 2) { throw new math.error.ArgumentsError('edivide', arguments.length, 2); } return collection.deepMap2(x, y, math.divide); }; };