⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Numeric
/
View File Name :
divmod-i.ri
U:RDoc::AnyMethod[iI"divmod:ETI"Numeric#divmod;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"OReturns an array containing the quotient and modulus obtained by dividing ;TI"+num+ by +numeric+.;To:RDoc::Markup::BlankLine o; ; [I"-If <code>q, r = x.divmod(y)</code>, then;T@o:RDoc::Markup::Verbatim; [I"q = floor(x/y) ;TI"x = q*y + r ;T:@format0o; ; [I"GThe quotient is rounded toward negative infinity, as shown in the ;TI"following table:;T@o;; [I"J a | b | a.divmod(b) | a/b | a.modulo(b) | a.remainder(b) ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A 13 | 4 | 3, 1 | 3 | 1 | 1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A 13 | -4 | -4, -3 | -4 | -3 | 1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A-13 | 4 | -4, 3 | -4 | 3 | -1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"A-13 | -4 | 3, -1 | 3 | -1 | -1 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C 11.5 | 4 | 2, 3.5 | 2.875 | 3.5 | 3.5 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C 11.5 | -4 | -3, -0.5 | -2.875 | -0.5 | 3.5 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C-11.5 | 4 | -3, 0.5 | -2.875 | 0.5 | -3.5 ;TI"J------+-----+---------------+---------+-------------+--------------- ;TI"C-11.5 | -4 | 2, -3.5 | 2.875 | -3.5 | -3.5 ;T; 0o; ; [I" Examples;T@o;; [ I"$11.divmod(3) #=> [3, 2] ;TI"&11.divmod(-3) #=> [-4, -1] ;TI"&11.divmod(3.5) #=> [3, 0.5] ;TI"'(-11).divmod(3.5) #=> [-4, 3.0] ;TI"%11.5.divmod(3.5) #=> [3, 1.0];T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"$num.divmod(numeric) -> array ;T0[ I" (p1);T@8FI"Numeric;TcRDoc::NormalClass00