New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mathjs

Package Overview
Dependencies
Maintainers
0
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathjs - npm Package Versions

1
29

0.25.0

Diff

Changelog

Source

2014-07-01, version 0.25.0

  • The library now immediately returns a default instance of mathjs, there is no need to instantiate math.js in a separate step unless one ones to set configuration options:

      // instead of:
      var mathjs = require('mathjs'),  // load math.js
          math = mathjs();             // create an instance
    
      // just do:
      var math = require('mathjs');
    
  • Implemented support for implicit multiplication, like math.eval('2a', {a:3}) and math.eval('(2+3)(1-3)'). This changes behavior of matrix indexes as well: an expression like [...][...] is not evaluated as taking a subset of the first matrix, but as an implicit multiplication of two matrices.

  • Removed utility function ifElse. This function is redundant now the expression parser has a conditional operator a ? b : c.

  • Fixed a bug with multiplying a number with a temperature, like math.eval('10 * celsius').

  • Fixed a bug with symbols having value undefined not being evaluated.

josdejong
published 0.24.1 •

Changelog

Source

2014-06-20, version 0.24.1

  • Something went wrong with publishing on npm.
josdejong
published 0.23.0 •

Changelog

Source

2014-06-10, version 0.23.0

  • Renamed some functions (everything now has a logical, camel case name):

    • Renamed functions edivide, emultiply, and epow to dotDivide, dotMultiply, and dotPow respectively.
    • Renamed functions smallereq and largereq to smallerEq and largerEq.
    • Renamed function unary to unaryMinus and added support for strings.
  • end is now a reserved keyword which cannot be used as function or symbol name in the expression parser, and is not allowed in the scope against which an expression is evaluated.

  • Implemented function unaryPlus and unary plus operator.

  • Implemented function deepEqual for matrix comparisons.

  • Added constant phi, the golden ratio (phi = 1.618...).

  • Added constant version, returning the version number of math.js as string.

  • Added unit drop (gtt).

  • Fixed not being able to load math.js using AMD/require.js.

  • Changed signature of math.parse(expr, nodes) to math.parse(expr, options) where options: {nodes: Object.<String, Node>}

  • Removed matrix support from conditional function ifElse.

  • Removed automatic assignment of expression results to variable ans. This functionality can be restored by pre- or postprocessing every evaluation, something like:

      function evalWithAns (expr, scope) {
        var ans = math.eval(expr, scope);
        if (scope) {
          scope.ans = ans;
        }
        return ans;
      }
    
josdejong
published 0.22.0 •

Changelog

Source

2014-05-22, version 0.22.0

  • Implemented support to export expressions to LaTeX. Thanks Niels Heisterkamp (@nheisterkamp).
  • Output of matrix multiplication is now consistently squeezed.
  • Added reference documentation in the section /docs/reference.
  • Fixed a bug in multiplying units without value with a number (like 5 * cm).
  • Fixed a bug in multiplying two matrices containing vectors (worked fine for arrays).
  • Fixed random functions not accepting Matrix as input, and always returning a Matrix as output.
josdejong
published 0.21.1 •

Changelog

Source

2014-05-13, version 0.21.1

  • Removed crypto library from the bundle.
  • Deprecated functions Parser.parse and Parser.compile. Use math.parse and math.compile instead.
  • Fixed function add not adding strings and matrices element wise.
  • Fixed parser not being able to evaluate an exponent followed by a unary minus like 2^-3, and a transpose followed by an index like [3]'[1].
josdejong
published 0.21.0 •

Changelog

Source

2014-04-24, version 0.21.0

  • Implemented trigonometric hyperbolic functions cosh, coth, csch, sech, sinh, tanh. Thanks Rogelio J. Baucells (@rjbaucells).
  • Added property type to all expression nodes in an expression tree.
  • Fixed functions log, log10, pow, and sqrt not supporting complex results from BigNumber input (like sqrt(bignumber(-4))).
josdejong
published 0.20.0 •

Changelog

Source

2014-04-16, version 0.20.0

  • Switched to module decimal.js for BigNumber support, instead of bignumber.js.
  • Implemented support for polar coordinates to the Complex datatype. Thanks Finn Pauls (@finnp).
  • Implemented BigNumber support for functions exp, log, and log10.
  • Implemented conditional operator a ? b : c in expression parser.
  • Improved floating point comparison: the functions now check whether values are nearly equal, against a configured maximum relative difference epsilon. Thanks Rogelio J. Baucells (@rjbaucells).
  • Implemented function norm. Thanks Rogelio J. Baucells (@rjbaucells).
  • Improved function ifElse, is now specified for special data types too.
  • Improved function det. Thanks Bryan Cuccioli (@bcuccioli).
  • Implemented BigNumber support for functions det and diag.
  • Added unit alias lbs (pound mass).
  • Changed configuration option decimals to precision (applies to BigNumbers only).
  • Fixed support for element-wise comparisons between a string and a matrix.
  • Fixed: expression parser now trows IndexErrors with one-based indices instead of zero-based.
  • Minor bug fixes.
josdejong
published 0.19.0 •

Changelog

Source

2014-03-30, version 0.19.0

  • Implemented functions compare, sum, prod, var, std, median.
  • Implemented function ifElse Thanks @mtraynham.
  • Minor bug fixes.
josdejong
published 0.18.1 •

Changelog

Source

2014-02-15, version 0.18.1

  • Added unit feet.
  • Implemented function compile (shortcut for parsing and then compiling).
  • Improved performance of function pow for matrices. Thanks @hamadu.
  • Fixed broken auto completion in the command line interface.
  • Fixed an error in function combinations for large numbers, and improved performance of both functions combinations and permutations.
josdejong
published 0.18.0 •

Changelog

Source

2014-01-18, version 0.18.0

  • Changed matrix index notation of expression parser from round brackets to square brackets, for example A[1, 1:3] instead of A(1, 1:3).
  • Removed need to use the function keyword for function assignments in the expression parser, you can define a function now like f(x) = x^2.
  • Implemented a compilation step in the expression parser: expressions are compiled into JavaScript, giving much better performance (easily 10x as fast).
  • Renamed unit conversion function and operator in to to. Operator in is still available in the expression parser as an alias for to. Added unit in, an abbreviation for inch. Thanks Elijah Insua (@tmpvar).
  • Added plurals and aliases for units.
  • Implemented an argument includeEnd for function range (false by default).
  • Ranges in the expression parser now support big numbers.
  • Implemented functions permutations and combinations. Thanks Daniel Levin (@daniel-levin).
  • Added lower case abbreviation l for unit litre.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc