| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Prime/ |
Upload File : |
U:RDoc::AnyMethod[iI"prime_division:EFI"Prime#prime_division;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Returns the factorization of +value+.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"+value+;T; [o; ; [I"An arbitrary integer.;To;;[I"+generator+;T; [o; ; [ I")Optional. A pseudo-prime generator. ;TI"++generator+.succ must return the next ;TI"*pseudo-prime number in the ascending ;TI"0order. It must generate all prime numbers, ;TI"1but may also generate non prime numbers too.;T@S;; i;I"Exceptions;To;;;;[o;;[I"+ZeroDivisionError+;T; [o; ; [I"when +value+ is zero.;T@S;; i;I"Example;To; ; [I"For an arbitrary integer:;T@o:RDoc::Markup::Verbatim; [I"0n = p_1**e_1 * p_2**e_2 * .... * p_n**e_n, ;T:@format0o; ; [I"prime_division(n) returns:;T@o;; [I"1[[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]]. ;TI" ;TI"0Prime.prime_division(12) #=> [[2,2], [3,1]];T;0: @fileI"lib/prime.rb;T:0@omit_headings_from_table_of_contents_below000[ I"0(value, generator = Prime::Generator23.new);T@@FI" Prime;TcRDoc::NormalClass00