1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
naruse 2017-03-12 16:29:47 +00:00
parent 198aac5950
commit d589608da9
3 changed files with 3 additions and 5 deletions

2
math.c
View file

@ -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) */
}
/*

View file

@ -3046,9 +3046,7 @@ str_eql(const VALUE str1, const VALUE str2)
* str == obj -> true or false
* str === obj -> true or false
*
* === Equality
*
* Returns whether +str+ == +obj+, similar to Object#==.
* Equality---Returns whether +str+ == +obj+, similar to Object#==.
*
* If +obj+ is not an instance of String but responds to +to_str+, then the
* two strings are compared using <code>obj.==</code>.

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.4.0"
#define RUBY_RELEASE_DATE "2017-03-13"
#define RUBY_PATCHLEVEL 83
#define RUBY_PATCHLEVEL 84
#define RUBY_RELEASE_YEAR 2017
#define RUBY_RELEASE_MONTH 3