Coder-Spirit/php-bignumbers

Long exponential part causes an error

Opened this issue · 1 comments

I noticed that there is no size check of exponential part. If I pass something like this:

1.33E+3333333333333333333333

It will cause "Allowed memory size exhausted" error.

Hello @silentvick , thanks for your bug report.

That's true, the problem is related with the inner representation. We need to think a good way to decouple the inner representation from the Decimal object in order too allow numbers with really big exponents.

The problem is that php-bignumbers is designed to offer good precision, and it's not trivial to decide the point where jump from fixed point to floating point representation.

Do you have any suggestion?