This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Float < Numeric (from ruby core) --- A Float object represents a sometimes-inexact real number using the native architecture's double-precision floating point representation. Floating point has a different arithmetic and is an inexact number. So you should know its esoteric system. See following: * https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html * https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#floats _imprecise * 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). You can convert certain objects to Floats with: * Method [Float](Kernel.html#method-i-Float). ## What's Here First, what's elsewhere. Class Float: * Inherits from [class Numeric](Numeric.html#class-Numeric-label-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 #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). ### Comparing [<](#method-i-3C) : Returns whether `self` is less than 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. #* : 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. --- # Constants: DIG : The minimum number of significant decimal digits in a double-precision floating point. Usually defaults to 15. EPSILON : The difference between 1 and the smallest double-precision floating point number greater than 1. Usually defaults to 2.2204460492503131e-16. INFINITY : An expression representing positive infinity. MANT_DIG : The number of base digits for the `double` data type. Usually defaults to 53. MAX : The largest possible integer in a double-precision floating point number. Usually defaults to 1.7976931348623157e+308. MAX_10_EXP : The largest positive exponent in a double-precision floating point where 10 raised to this power minus 1. Usually defaults to 308. MAX_EXP : The largest possible exponent value in a double-precision floating point. Usually defaults to 1024. MIN : The smallest positive normalized number in a double-precision floating point. Usually defaults to 2.2250738585072014e-308. If the platform supports denormalized numbers, there are numbers between zero and Float::MIN. 0.0.next_float returns the smallest positive floating point number including denormalized numbers. MIN_10_EXP : The smallest negative exponent in a double-precision floating point where 10 raised to this power minus 1. Usually defaults to -307. MIN_EXP : The smallest possible exponent value in a double-precision floating point. Usually defaults to -1021. NAN : An expression representing a value which is "not a number". RADIX : The base of the floating point, or number of unique digits used to represent the number. Usually defaults to 2 on most systems, which would represent a base-10 decimal. # Instance methods: % * ** + - -@ / < <= <=> == === > >= abs angle arg ceil coerce denominator divmod eql? fdiv finite? floor hash infinite? inspect magnitude modulo nan? negative? next_float numerator phase positive? prev_float quo rationalize round to_d to_f to_i to_int to_r to_s truncate zero?
This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.