mathjs v0.12.0 Release Notes

Release Date: 2013-08-22 // over 10 years ago
    • Implemented functions random([min, max]), randomInt([min, max]), pickRandom(array). Thanks Sebastien Piquemal (@sebpic).
    • Implemented function distribution(name), generating a distribution object with functions random, randomInt, pickRandom for different distributions. Currently supporting uniform and normal.
    • ๐Ÿ”„ Changed the behavior of range to exclude the upper bound, so range(1, 4) now returns [1, 2, 3] instead of [1, 2, 3, 4].
    • ๐Ÿ”„ Changed the syntax of range, which is now range(start, end [, step]) instead of range(start, [step, ] end).
    • ๐Ÿ”„ Changed the behavior of ones and zeros to geometric dimensions, for example ones(3) returns a vector with length 3, filled with ones, and ones(3,3) returns a 2D array with size [3, 3].
    • ๐Ÿ”„ Changed the return type of ones and zeros: they now return an Array when arguments are Numbers or an Array, and returns a Matrix when the argument is a Matrix.
    • ๐Ÿ”„ Change matrix index notation in parser from round brackets to square brackets, for example A[0, 0:3].
    • โœ‚ Removed the feature introduced in v0.10.0 to automatically convert a complex value with an imaginary part equal to zero to a number.
    • ๐Ÿ›  Fixed zeros being formatted as null. Thanks @TimKraft.