josdejong / josdejong/mathjs

Errors in function reference examples

Open
#2,453 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

PR #2452 adds tests that reveal 89 of the function reference pages have errors in their code examples. While some of them are simple syntax errors like a missing close parenthesis (e.g., the second-to-last example in https://mathjs.org/docs/reference/functions/isNumeric.html), some are significant departures in functionality from what's documented (e.g., the only example in https://mathjs.org/docs/reference/functions/sqrtm.html actually produces `Error: computing square root of matrix: iterative method could not converge`).

In any case, it seems to me that all of them should eventually be fixed, so that then going forward we can use the new test to ensure that mathjs always conforms to the documented behavior.

Currently doc.test.js merely prints the discrepancies rather than failing, but as they are fixed we can progressively remove the allowances for the discrepancies.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.