From 0fc7723bafc22bc37ac8d7ce71a330e384ab99e1 Mon Sep 17 00:00:00 2001 From: danogentili Date: Fri, 29 Jul 2016 20:54:31 +0200 Subject: [PATCH] Fixed mistake in documentation: according to http://php.net/manual/en/language.types.string.php, a string can store up to 2147483647 chars --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 80d8d0f..abf4fe6 100644 --- a/README.md +++ b/README.md @@ -103,8 +103,7 @@ BigDecimal::of('1/3'); // ArithmeticException Note about native integers: instantiating from an `int` is safe *as long as you don't exceed the maximum value for your platform* (`PHP_INT_MAX`), in which case it would be transparently converted to `float` by PHP without -notice, and could result in a loss of information. In doubt, prefer instantiating from a `string`, which supports -an unlimited numbers of digits: +notice, and could result in a loss of information. In doubt, prefer instantiating from a `string`, since it can store up to 2147483647 digits: ```php echo BigInteger::of(999999999999999999999); // 1000000000000000000000 @@ -112,8 +111,7 @@ echo BigInteger::of('999999999999999999999'); // 999999999999999999999 ``` Note about floating-point values: instantiating from a `float` might be unsafe, as floating-point values are -imprecise by design, and could result in a loss of information. Always prefer instantiating from a `string`, which -supports an unlimited number of digits: +imprecise by design, and could result in a loss of information. Always prefer instantiating from a `string`, since it can store up to 2147483647 digits: ```php echo BigDecimal::of(1.99999999999999999999); // 2