MikeMcl / decimal.js

An arbitrary-precision Decimal type for JavaScript
http://mikemcl.github.io/decimal.js
MIT License
6.35k stars 480 forks source link

What is the meaning of this error? Can you make it clear? #199

Closed sicaifang closed 2 years ago

sicaifang commented 2 years ago

image

sicaifang commented 2 years ago

I didn't introduce decimal.js directly, it was "mathjs ": "8.1.0" in my project. How do I resolve this error?

MikeMcl commented 2 years ago

The error shows that an attempt has been made to create a new Decimal from an invalid argument. The third line down in the image shows that the argument contains the sequence fa5eb and is therefore rejected as an invalid decimal number.

The error can be resolved by not trying to create a new Decimal from an invalid argument. There is no issue here as far as I can see, decimal.js is working as expected.

sicaifang commented 2 years ago

该错误表明已尝试new Decimal从无效参数创建 a。图像中的第三行显示参数包含序列fa5eb,因此被拒绝为无效的十进制数。

可以通过不尝试new Decimal从无效参数创建 a 来解决该错误。据我所知,这里没有问题,_decimal.js_正在按预期工作。

Thank you for your reply. I think I should go to check why THE value of PI was modified after my project was packaged