Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 86cc13c

Browse files
author
Adam Benson
committed
ISSUE-60: Added extra test to verify log10 for numbers between 0 - 1
1 parent 590ef62 commit 86cc13c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/regression/issue60Test.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,13 @@ public function test_that_fromFloat_division_does_not_calculate_invalid_log10_av
1515
$this->assertEquals(0.05005, $value->div($divisor)->asFloat());
1616
$this->assertEquals(0.000434077479319, $value->log10()->asFloat());
1717
}
18+
19+
public function test_that_fromFloat_less_than_1_still_correct()
20+
{
21+
$value = Decimal::fromFloat(0.175);
22+
$divisor = Decimal::fromFloat(20);
23+
24+
$this->assertEquals(0.009, $value->div($divisor)->asFloat());
25+
$this->assertEquals(-0.7569, $value->log10()->asFloat());
26+
}
1827
}

0 commit comments

Comments
 (0)