Skip to content

Commit

Permalink
Add precision about toFloat() and Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Nov 7, 2018
1 parent a16737c commit 96936b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/BigNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ abstract public function toInt() : int;
* Note that this method can discard information as the precision of a floating-point value
* is inherently limited.
*
* If the number is greater than the largest representable floating point number, positive infinity is returned.
* If the number is less than the smallest representable floating point number, negative infinity is returned.
*
* @return float The converted value.
*/
abstract public function toFloat() : float;
Expand Down

0 comments on commit 96936b2

Please sign in to comment.