Skip to content

TypeError: Cannot implicitly convert a number with >15 significant digits to BigNumber #1269

@zcohan

Description

@zcohan

Here's my code:

math.config({number: 'BigNumber', precision: 64})
math.eval('80 / day * 5 days')

I'm expecting the result '400'.

It works fine without configuring with BigNumber, but I do need to use BigNumber on my math object in general, as high precision might be important for the calculation and I don't know the user's expression ahead of time. I've tried BigNumbering parts of the expression, but haven't had any luck.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions