D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Float
/
Filename :
cdesc-Float.ri
back
Copy
U:RDoc::NormalClass[iI" Float:ET@I"Numeric;To:RDoc::Markup::Document:@parts[o;;[!o:RDoc::Markup::Paragraph;[I"QA \Float object represents a sometimes-inexact real number using the native ;TI"Carchitecture's double-precision floating point representation.;To:RDoc::Markup::BlankLine o; ;[I"IFloating point has a different arithmetic and is an inexact number. ;TI";So you should know its esoteric system. See following:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"Dhttps://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html;To;;0;[o; ;[I"bhttps://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#-why-are-rubys-floats-imprecise;To;;0;[o; ;[I"Chttps://en.wikipedia.org/wiki/Floating_point#Accuracy_problems;T@o; ;[I"4You can create a \Float object explicitly with:;T@o;;; ;[o;;0;[o; ;[I"NA {floating-point literal}[rdoc-ref:syntax/literals.rdoc@Float+Literals].;T@o; ;[I"4You can convert certain objects to Floats with:;T@o;;; ;[o;;0;[o; ;[I"\Method #Float.;T@S:RDoc::Markup::Heading: leveli: textI"What's Here;T@o; ;[I",First, what's elsewhere. \Class \Float:;T@o;;; ;[o;;0;[o; ;[I"Inherits from ;TI"5{class Numeric}[rdoc-ref:Numeric@What-27s+Here] ;TI"7and {class Object}[rdoc-ref:Object@What-27s+Here].;To;;0;[o; ;[I"EIncludes {module Comparable}[rdoc-ref:Comparable@What-27s+Here].;T@o; ;[I"-Here, class \Float provides methods for:;T@o;;; ;[o;;0;[o; ;[I"({Querying}[rdoc-ref:Float@Querying];To;;0;[o; ;[I"*{Comparing}[rdoc-ref:Float@Comparing];To;;0;[o; ;[I",{Converting}[rdoc-ref:Float@Converting];T@S;;i;I" Querying;T@o;;; ;[ o;;0;[o; ;[I"0#finite?: Returns whether +self+ is finite.;To;;0;[o; ;[I"5#hash: Returns the integer hash code for +self+.;To;;0;[o; ;[I"4#infinite?: Returns whether +self+ is infinite.;To;;0;[o; ;[I";#nan?: Returns whether +self+ is a NaN (not-a-number).;T@S;;i;I"Comparing;T@o;;; ;[o;;0;[o; ;[I"=#<: Returns whether +self+ is less than the given value.;To;;0;[o; ;[I"J#<=: Returns whether +self+ is less than or equal to the given value.;To;;0;[o; ;[I"J#<=>: Returns a number indicating whether +self+ is less than, equal ;TI")to, or greater than the given value.;To;;0;[o; ;[I"I#== (aliased as #=== and #eql?): Returns whether +self+ is equal to ;TI"the given value.;To;;0;[o; ;[I"@#>: Returns whether +self+ is greater than the given value.;To;;0;[o; ;[I"M#>=: Returns whether +self+ is greater than or equal to the given value.;T@S;;i;I"Converting;T@o;;; ;[o;;0;[o; ;[I"D#% (aliased as #modulo): Returns +self+ modulo the given value.;To;;0;[o; ;[I";#*: Returns the product of +self+ and the given value.;To;;0;[o; ;[I"M#**: Returns the value of +self+ raised to the power of the given value.;To;;0;[o; ;[I"7#+: Returns the sum of +self+ and the given value.;To;;0;[o; ;[I">#-: Returns the difference of +self+ and the given value.;To;;0;[o; ;[I"<#/: Returns the quotient of +self+ and the given value.;To;;0;[o; ;[I"H#ceil: Returns the smallest number greater than or equal to +self+.;To;;0;[o; ;[I"Y#coerce: Returns a 2-element array containing the given value converted to a \Float ;TI"and +self+;To;;0;[o; ;[I"N#divmod: Returns a 2-element array containing the quotient and remainder ;TI"3results of dividing +self+ by the given value.;To;;0;[o; ;[I"L#fdiv: Returns the \Float result of dividing +self+ by the given value.;To;;0;[o; ;[I"I#floor: Returns the greatest number smaller than or equal to +self+.;To;;0;[o; ;[I"?#next_float: Returns the next-larger representable \Float.;To;;0;[o; ;[I"@#prev_float: Returns the next-smaller representable \Float.;To;;0;[o; ;[I"H#quo: Returns the quotient from dividing +self+ by the given value.;To;;0;[o; ;[I"O#round: Returns +self+ rounded to the nearest value, to a given precision.;To;;0;[o; ;[I"H#to_i (aliased as #to_int): Returns +self+ truncated to an Integer.;To;;0;[o; ;[I"N#to_s (aliased as #inspect): Returns a string containing the place-value ;TI"1representation of +self+ in the given radix.;To;;0;[o; ;[I">#truncate: Returns +self+ truncated to a given precision.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I"numeric.rb;T;0;0;0[ [U:RDoc::Constant[i I" RADIX;TI"Float::RADIX;T:public0o;;[o; ;[I"HThe base of the floating point, or number of unique digits used to ;TI"represent the number.;T@o; ;[I"TUsually defaults to 2 on most systems, which would represent a base-10 decimal.;T;@�;0@�@cRDoc::NormalClass0U;[i I" MANT_DIG;TI"Float::MANT_DIG;T;0o;;[o; ;[I":The number of base digits for the +double+ data type.;T@o; ;[I"Usually defaults to 53.;T;@�;0@�@@ 0U;[i I"DIG;TI"Float::DIG;T;0o;;[o; ;[I"LThe minimum number of significant decimal digits in a double-precision ;TI"floating point.;T@o; ;[I"Usually defaults to 15.;T;@�;0@�@@ 0U;[i I"MIN_EXP;TI"Float::MIN_EXP;T;0o;;[o; ;[I"IThe smallest possible exponent value in a double-precision floating ;TI"point.;T@o; ;[I"Usually defaults to -1021.;T;@�;0@�@@ 0U;[i I"MAX_EXP;TI"Float::MAX_EXP;T;0o;;[o; ;[I"HThe largest possible exponent value in a double-precision floating ;TI"point.;T@o; ;[I"Usually defaults to 1024.;T;@�;0@�@@ 0U;[i I"MIN_10_EXP;TI"Float::MIN_10_EXP;T;0o;;[o; ;[I"IThe smallest negative exponent in a double-precision floating point ;TI"+where 10 raised to this power minus 1.;T@o; ;[I"Usually defaults to -307.;T;@�;0@�@@ 0U;[i I"MAX_10_EXP;TI"Float::MAX_10_EXP;T;0o;;[o; ;[I"NThe largest positive exponent in a double-precision floating point where ;TI"%10 raised to this power minus 1.;T@o; ;[I"Usually defaults to 308.;T;@�;0@�@@ 0U;[i I"MIN;TI"Float::MIN;T;0o;;[ o; ;[I"RThe smallest positive normalized number in a double-precision floating point.;T@o; ;[I"1Usually defaults to 2.2250738585072014e-308.;T@o; ;[ I"4If the platform supports denormalized numbers, ;TI"4there are numbers between zero and Float::MIN. ;TI"H0.0.next_float returns the smallest positive floating point number ;TI"$including denormalized numbers.;T;@�;0@�@@ 0U;[i I"MAX;TI"Float::MAX;T;0o;;[o; ;[I"NThe largest possible integer in a double-precision floating point number.;T@o; ;[I"1Usually defaults to 1.7976931348623157e+308.;T;@�;0@�@@ 0U;[i I"EPSILON;TI"Float::EPSILON;T;0o;;[o; ;[I"IThe difference between 1 and the smallest double-precision floating ;TI"!point number greater than 1.;T@o; ;[I"0Usually defaults to 2.2204460492503131e-16.;T;@�;0@�@@ 0U;[i I" INFINITY;TI"Float::INFINITY;T;0o;;[o; ;[I"2An expression representing positive infinity.;T;@�;0@�@@ 0U;[i I"NAN;TI"Float::NAN;T;0o;;[o; ;[I"@An expression representing a value which is "not a number".;T;@�;0@�@@ 0[ [[I" class;T[[;[ [:protected[ [:private[ [I" instance;T[[;[4[I"%;TI"numeric.c;T[I"*;T@�[I"**;T@�[I"+;T@�[I"-;T@�[I"-@;TI"numeric.rb;T[I"/;T@�[I"<;T@�[I"<=;T@�[I"<=>;T@�[I"==;T@�[I"===;T@�[I">;T@�[I">=;T@�[I"abs;T@�[I" angle;TI"complex.c;T[I"arg;T@�[I" ceil;T@�[I"coerce;T@�[I"denominator;TI"rational.c;T[I"divmod;T@�[I" eql?;T@�[I" fdiv;T@�[I"finite?;T@�[I" floor;T@�[I" hash;T@�[I"infinite?;T@�[I"inspect;T@�[I"magnitude;T@�[I"modulo;T@�[I" nan?;T@�[I"negative?;T@�[I"next_float;T@�[I"numerator;T@�[I" phase;T@�[I"positive?;T@�[I"prev_float;T@�[I"quo;T@�[I"rationalize;T@�[I" round;T@�[I" to_f;T@�[I" to_i;T@�[I"to_int;T@�[I" to_r;T@�[I" to_s;T@�[I" truncate;T@�[I" zero?;T@�[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[I"complex.c;TI"ext/date/lib/date.rb;TI"*ext/psych/lib/psych/scalar_scanner.rb;TI"ext/socket/lib/socket.rb;TI"$lib/prism/translation/ripper.rb;TI"lib/reline.rb;TI"lib/reline/io.rb;TI"lib/reline/io/ansi.rb;TI"lib/reline/line_editor.rb;TI"2lib/rubygems/safe_marshal/visitors/to_ruby.rb;T@�@�I"rational.c;T@cRDoc::TopLevel