Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
Float
/
//opt/alt/ruby27/share/ri/system/Float/floor-i.ri
U:RDoc::AnyMethod[iI" floor:ETI"Float#floor;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns the largest number less than or equal to +float+ with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLine o; ; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least <code>ndigits.abs</code> trailing zeros.;T@o; ; [I"AReturns a floating point number when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"1.2.floor #=> 1 ;TI"2.0.floor #=> 2 ;TI"(-1.2).floor #=> -2 ;TI"(-2.0).floor #=> -2 ;TI" ;TI""1.234567.floor(2) #=> 1.23 ;TI"#1.234567.floor(3) #=> 1.234 ;TI"$1.234567.floor(4) #=> 1.2345 ;TI"%1.234567.floor(5) #=> 1.23456 ;TI" ;TI"34567.89.floor(-5) #=> 0 ;TI"#34567.89.floor(-4) #=> 30000 ;TI"#34567.89.floor(-3) #=> 34000 ;TI"#34567.89.floor(-2) #=> 34500 ;TI"#34567.89.floor(-1) #=> 34560 ;TI"#34567.89.floor(0) #=> 34567 ;TI"%34567.89.floor(1) #=> 34567.8 ;TI"&34567.89.floor(2) #=> 34567.89 ;TI"&34567.89.floor(3) #=> 34567.89 ;T:@format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o;; [I"!(0.3 / 0.1).floor #=> 2 (!);T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"2float.floor([ndigits]) -> integer or float ;T0[ I"(*args);T@4FI" Float;TcRDoc::NormalClass00