mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* numeric.c: Add description of that the results of the comparing
operations of two NaNs are undefined. [#1720] [ruby-dev:38725] [ruby-core:36966] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a68cc24a9e
commit
6ea34efab0
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Nov 8 09:34:00 2012 Kenta Murata <mrkn@cookpad.com>
|
||||
|
||||
* numeric.c: Add description of that the results of the comparing
|
||||
operations of two NaNs are undefined.
|
||||
[#1720] [ruby-dev:38725] [ruby-core:36966]
|
||||
|
||||
Thu Nov 8 04:45:21 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* include/ruby/intern.h: Restore rb_enumeratorize as it was before
|
||||
|
|
14
numeric.c
14
numeric.c
|
@ -1042,6 +1042,8 @@ num_equal(VALUE x, VALUE y)
|
|||
* Returns <code>true</code> only if <i>obj</i> has the same value
|
||||
* as <i>flt</i>. Contrast this with <code>Float#eql?</code>, which
|
||||
* requires <i>obj</i> to be a <code>Float</code>.
|
||||
* The result of <code>NaN == NaN</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*
|
||||
* 1.0 == 1 #=> true
|
||||
*
|
||||
|
@ -1109,6 +1111,8 @@ rb_dbl_cmp(double a, double b)
|
|||
* Returns -1, 0, +1 or nil depending on whether <i>flt</i> is less
|
||||
* than, equal to, or greater than <i>real</i>. This is the basis for
|
||||
* the tests in <code>Comparable</code>.
|
||||
* The result of <code>NaN <=> NaN</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
@ -1153,6 +1157,8 @@ flo_cmp(VALUE x, VALUE y)
|
|||
* flt > real -> true or false
|
||||
*
|
||||
* <code>true</code> if <code>flt</code> is greater than <code>real</code>.
|
||||
* The result of <code>NaN > NaN</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
@ -1193,6 +1199,8 @@ flo_gt(VALUE x, VALUE y)
|
|||
*
|
||||
* <code>true</code> if <code>flt</code> is greater than
|
||||
* or equal to <code>real</code>.
|
||||
* The result of <code>NaN >= NaN</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
@ -1232,6 +1240,8 @@ flo_ge(VALUE x, VALUE y)
|
|||
* flt < real -> true or false
|
||||
*
|
||||
* <code>true</code> if <code>flt</code> is less than <code>real</code>.
|
||||
* The result of <code>NaN < NaN</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
@ -1272,6 +1282,8 @@ flo_lt(VALUE x, VALUE y)
|
|||
*
|
||||
* <code>true</code> if <code>flt</code> is less than
|
||||
* or equal to <code>real</code>.
|
||||
* The result of <code>NaN <= NaN</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
@ -1313,6 +1325,8 @@ flo_le(VALUE x, VALUE y)
|
|||
* Returns <code>true</code> only if <i>obj</i> is a
|
||||
* <code>Float</code> with the same value as <i>flt</i>. Contrast this
|
||||
* with <code>Float#==</code>, which performs type conversions.
|
||||
* The result of <code>NaN.eql?(NaN)</code> is undefined, so the
|
||||
* implementation-dependent value is returned.
|
||||
*
|
||||
* 1.0.eql?(1) #=> false
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue