📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 09:17:08
📂
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Numeric
📍 /opt/alt/ruby33/share/ri/system/Numeric
🔄 Refresh
✏️
Editing: modulo-i.ri
Read Only
U:RDoc::AnyMethod[iI"modulo:ETI"Numeric#modulo;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"4Returns +self+ modulo +other+ as a real number.;To:RDoc::Markup::BlankLine o; ; [I"/Of the Core and Standard Library classes, ;TI",only Rational uses this implementation.;T@o; ; [I"LFor Rational +r+ and real number +n+, these expressions are equivalent:;T@o:RDoc::Markup::Verbatim; [I"r % n ;TI"r-n*(r/n).floor ;TI"r.divmod(n)[1] ;T:@format0o; ; [I"See Numeric#divmod.;T@o; ; [I"Examples:;T@o;; [I"&r = Rational(1, 2) # => (1/2) ;TI"&r2 = Rational(2, 3) # => (2/3) ;TI"&r % r2 # => (1/2) ;TI"&r % 2 # => (1/2) ;TI"$r % 2.0 # => 0.5 ;TI" ;TI"*r = Rational(301,100) # => (301/100) ;TI"&r2 = Rational(7,5) # => (7/5) ;TI")r % r2 # => (21/100) ;TI"+r % -r2 # => (-119/100) ;TI"*(-r) % r2 # => (119/100) ;TI")(-r) %-r2 # => (-21/100);T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below000[ I" (p1);T@/FI"Numeric;TcRDoc::NormalClass0[@2FI"%;T
💾 Save Changes
❌ Cancel