summaryrefslogtreecommitdiff
path: root/ext/standard/math.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-05-28 16:52:15 +0200
committerOndřej Surý <ondrej@sury.org>2012-05-28 16:52:15 +0200
commit01c525f668ecff08bea21c4ff22745b8f77e8c3a (patch)
tree07ebb675549d7a8ceb905676e4894151122321ac /ext/standard/math.c
parentd4d61a2bcb9975c8aeddbc6603211064174087a9 (diff)
downloadphp-01c525f668ecff08bea21c4ff22745b8f77e8c3a.tar.gz
Imported Upstream version 5.4.4~rc1upstream/5.4.4_rc1
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r--ext/standard/math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 302fbdae4..65187f6fa 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -37,7 +37,7 @@ static inline int php_intlog10abs(double value) {
int result;
value = fabs(value);
- if (value < 1e-8 || value > 1e23) {
+ if (value < 1e-8 || value > 1e22) {
result = (int)floor(log10(value));
} else {
static const double values[] = {
@@ -46,7 +46,7 @@ static inline int php_intlog10abs(double value) {
1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
/* Do a binary search with 5 steps */
- result = 16;
+ result = 15;
if (value < values[result]) {
result -= 8;
} else {