summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 16:29:47 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 16:29:47 +0000
commitd589608da9915722e494119a874cb36cc5e42df2 (patch)
tree576c3f42eea2cde7905dff73debce74409706cd4 /math.c
parent198aac595092e55a10cb458151556492a985b734 (diff)
merge revision(s) 57778,57779:
string.c: [DOC] fix doc formatting for String#==, #=== math.c: more accuracy * math.c (math_log10): calculate log10(2) for more accuracy. [ruby-core:79907] [Bug #13279] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'math.c')
-rw-r--r--math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math.c b/math.c
index 74dff9e720..523937ecb3 100644
--- a/math.c
+++ b/math.c
@@ -563,7 +563,7 @@ math_log10(VALUE unused_obj, VALUE x)
/* check for pole error */
if (d == 0.0) return DBL2NUM(-INFINITY);
- return DBL2NUM(log10(d) + numbits * M_LN2/M_LN10); /* log10(d * 2 ** numbits) */
+ return DBL2NUM(log10(d) + numbits * log10(2)); /* log10(d * 2 ** numbits) */
}
/*