Closed RobbeCl closed 2 years ago
When using multiplication, it is not calculating correctly. I don't know if it is intended to work this way or maybe something else.
The example: Decimal.Decimal(365).mul(2.7397260273972600000000).toNumber() returns "999.9999999999999" while the answer should be 1000 exactly.
Decimal.Decimal(365).mul(2.7397260273972600000000).toNumber()
I thought this library would solve this issue or am I missing something?
Yes, it certainly seems like you are missing something.
It is obvious at a glance that the exact answer could not possibly be 1000.
When using multiplication, it is not calculating correctly. I don't know if it is intended to work this way or maybe something else.
The example:
Decimal.Decimal(365).mul(2.7397260273972600000000).toNumber()
returns "999.9999999999999" while the answer should be 1000 exactly.I thought this library would solve this issue or am I missing something?