core/float.rbs in rbs-3.0.0.dev.2 vs core/float.rbs in rbs-3.0.0.dev.3

- old
+ new

@@ -11,132 +11,76 @@ # * https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems # # # You can create a Float object explicitly with: # -# * A [floating-point -# literal](doc/syntax/literals_rdoc.html#label-Float+Literals). +# * A [floating-point literal](rdoc-ref:syntax/literals.rdoc@Float+Literals). # # # You can convert certain objects to Floats with: # -# * Method [Float](Kernel.html#method-i-Float). +# * Method #Float. # # # ## What's Here # # First, what's elsewhere. Class Float: # -# * Inherits from [class -# Numeric](Numeric.html#class-Numeric-label-What-27s+Here). +# * Inherits from [class Numeric](rdoc-ref:Numeric@What-27s+Here). # # # Here, class Float provides methods for: # -# * [Querying](#class-Float-label-Querying) -# * [Comparing](#class-Float-label-Comparing) -# * [Converting](#class-Float-label-Converting) +# * [Querying](rdoc-ref:Float@Querying) +# * [Comparing](rdoc-ref:Float@Comparing) +# * [Converting](rdoc-ref:Float@Converting) # # # ### Querying # -# #finite? -# : Returns whether `self` is finite. +# * #finite?: Returns whether `self` is finite. +# * #hash: Returns the integer hash code for `self`. +# * #infinite?: Returns whether `self` is infinite. +# * #nan?: Returns whether `self` is a NaN (not-a-number). # -# #hash -# : Returns the integer hash code for `self`. # -# #infinite? -# : Returns whether `self` is infinite. -# -# #nan? -# : Returns whether `self` is a NaN (not-a-number). -# -# -# # ### Comparing # -# [<](#method-i-3C) -# : Returns whether `self` is less than the given value. +# * #<: Returns whether `self` is less than the given value. +# * #<=: Returns whether `self` is less than or equal to the given value. +# * #<=>: Returns a number indicating whether `self` is less than, equal to, +# or greater than the given value. +# * #== (aliased as #=== and #eql?): Returns whether `self` is equal to the +# given value. +# * #>: Returns whether `self` is greater than the given value. +# * #>=: Returns whether `self` is greater than or equal to the given value. # -# [<=](#method-i-3C-3D) -# : Returns whether `self` is less than or equal to the given value. # -# [<=>](#method-i-3C-3D-3E) -# : Returns a number indicating whether `self` is less than, equal to, or -# greater than the given value. -# -# [==](#method-i-3D-3D) (aliased as #=== and #eql>) -# : Returns whether `self` is equal to the given value. -# -# [>](#method-i-3E) -# : Returns whether `self` is greater than the given value. -# -# [>=](#method-i-3E-3D) -# : Returns whether `self` is greater than or equal to the given value. -# -# -# # ### Converting # -# #% (aliased as #modulo) -# : Returns `self` modulo the given value. +# * #% (aliased as #modulo): Returns `self` modulo the given value. +# * #*: Returns the product of `self` and the given value. +# * #**: Returns the value of `self` raised to the power of the given value. +# * #+: Returns the sum of `self` and the given value. +# * #-: Returns the difference of `self` and the given value. +# * #/: Returns the quotient of `self` and the given value. +# * #ceil: Returns the smallest number greater than or equal to `self`. +# * #coerce: Returns a 2-element array containing the given value converted to +# a Float and `self` +# * #divmod: Returns a 2-element array containing the quotient and remainder +# results of dividing `self` by the given value. +# * #fdiv: Returns the Float result of dividing `self` by the given value. +# * #floor: Returns the greatest number smaller than or equal to `self`. +# * #next_float: Returns the next-larger representable Float. +# * #prev_float: Returns the next-smaller representable Float. +# * #quo: Returns the quotient from dividing `self` by the given value. +# * #round: Returns `self` rounded to the nearest value, to a given precision. +# * #to_i (aliased as #to_int): Returns `self` truncated to an Integer. +# * #to_s (aliased as #inspect): Returns a string containing the place-value +# representation of `self` in the given radix. +# * #truncate: Returns `self` truncated to a given precision. # -# #* -# : Returns the product of `self` and the given value. -# -# [**](#method-i-2A-2A) -# : Returns the value of `self` raised to the power of the given value. -# -# #+ -# : Returns the sum of `self` and the given value. -# -# #- -# : Returns the difference of `self` and the given value. -# -# [/](#method-i-2F) -# : Returns the quotient of `self` and the given value. -# -# #ceil -# : Returns the smallest number greater than or equal to `self`. -# -# #coerce -# : Returns a 2-element array containing the given value converted to a -# Float and `self` -# -# #divmod -# : Returns a 2-element array containing the quotient and remainder -# results of dividing `self` by the given value. -# -# #fdiv -# : Returns the Float result of dividing `self` by the given value. -# -# #floor -# : Returns the greatest number smaller than or equal to `self`. -# -# #next_float -# : Returns the next-larger representable Float. -# -# #prev_float -# : Returns the next-smaller representable Float. -# -# #quo -# : Returns the quotient from dividing `self` by the given value. -# -# #round -# : Returns `self` rounded to the nearest value, to a given precision. -# -# #to_i (aliased as #to_int) -# : Returns `self` truncated to an Integer. -# -# #to_s (aliased as #inspect) -# : Returns a string containing the place-value representation of `self` -# in the given radix. -# -# #truncate -# : Returns `self` truncated to a given precision. -# class Float < Numeric public # <!-- # rdoc-file=numeric.c @@ -544,10 +488,10 @@ # <!-- # rdoc-file=numeric.c # - finite? -> true or false # --> - # Returns `true` if `self` is not `Infinity`, `-Infinity`, or `Nan`, `false` + # Returns `true` if `self` is not `Infinity`, `-Infinity`, or `NaN`, `false` # otherwise: # # f = 2.0 # => 2.0 # f.finite? # => true # f = 1.0/0.0 # => Infinity