Closed maff closed 7 years ago
When using the library for divisions at a higher scale, you can run into division by zero errors:
<?php declare(strict_types=1); use Litipk\BigNumbers\Decimal; require_once __DIR__ . '/vendor/autoload.php'; $value = Decimal::create('12.99', 4); $divisor = Decimal::create(2, 4); var_dump($value->div($divisor));
Warning: bcdiv(): Division by zero in src/Decimal.php on line 1155
The affected part is the innerLog10 method used while calculating the division.
innerLog10
Hi @maff , thank you for your report. I'll work on the regression test and the fix, in a few hours this will be solved :) .
Solved!
@castarco Thanks!
When using the library for divisions at a higher scale, you can run into division by zero errors:
The affected part is the
innerLog10
method used while calculating the division.