5 Commits

Author SHA1 Message Date
Jos de Jong
391677f9e0 fix #2888: update type definitions of function unit to allow creating a unit from a fraction or complex number 2023-02-02 10:32:06 +01:00
brunoSnoww
654e1b7357
Refactor dotMultiply, dotPow and dotDivide types (#2890)
* refactor types

* refactor on chain types

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-01-31 17:21:36 +01:00
brunoSnoww
0c6e832ab7
Fix: Add "rotationMatrix" function type (#2860)
* fix: add rotation matrix type

* remove mistaken test

* code-review: refactor type and add tests for it
2022-12-09 16:33:58 +01:00
Glen Whitney
f6d3e9ea8d
feat: add polynomialRoot function (#2839)
* feat: add polynomialRoot function

  This is intended as a benchmark for general arithmetic/basic algebra
  functionality of mathjs, but was chosen to be something of potential
  independent utility as well, worth adding to mathjs in its own right.

  Currently ol=nly computes the numerical roots for real or complex
  polynomials of degree three or less.

  As usual, adds documentation, embedded documentation, tests, TypeScript
  declaration, and TypeScript tests.

  Also updates doc.test.js to make it easier to specify an array of complex
  numbers as the expected output, and comapres with the appropriate fuzz
  in such cases.

  Finally, adds a benchmark that computes the roots of all cubics with
  nonnegative integer coefficients no larger than five.

* doc: fix typo in polynomialRoot embedded docs

Thanks, SamuelTLG

* style: avoid slightly cryptic Boolean flag stand-in
2022-11-18 15:53:45 +01:00
Jos de Jong
5e439be0a8
Fix #2809: code completion issues in some IDE's (#2812)
* Move types/index.ts to test/typescript-tests/testTypes.ts (WIP)

* Fix the paths for the test:types script

* Move tsconfig.json to the root
2022-10-19 08:23:14 +02:00