You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are starting to use mathjs 14 with bigint support in the Numberscope project, naturally shaking out some points concerning overall support for bigints. This issue collects four issues, for the sake of the PR for them I am about to file.
mathjs crashes if a bigint is used in a non-type-homogeneous instance of max or min.
if randomInt is called with bigint parameters, it returns a number, rather than a bigint.
randomInt cannot handle a range wider than the precision of a number (2^53).
log, log2, and log10 do not succeed on all bigint inputs.
To Reproduce
math.max(10n, 3, new BigNumber(7), fraction(3, 4))
math.randomInt(0n, 6n) // returns 0, 1, 2, 3, 4, or 5, not 0n, 1n, 2n, 3n, 4n, or 5n.
math.randomInt(0n, 10000000000000000n) // does not choose uniformly; many outputs impossible
math.log(10000000000000000n) // fails in implicit bigint->number conversion
The text was updated successfully, but these errors were encountered:
Describe the bug
We are starting to use mathjs 14 with bigint support in the Numberscope project, naturally shaking out some points concerning overall support for bigints. This issue collects four issues, for the sake of the PR for them I am about to file.
To Reproduce
The text was updated successfully, but these errors were encountered: