Square form factorization: Difference between revisions
Content deleted Content added
m Minor code improvement. |
m Minor code improvement |
||
Line 449: | Line 449: | ||
for ( uint32_t i = 0; i < 20; ++i ) { |
for ( uint32_t i = 0; i < 20; ++i ) { |
||
uint64_t test = distribution(random); |
uint64_t test = distribution(random); |
||
std::cout << "N = " << test; |
|||
uint64_t factor = squfof(test); |
uint64_t factor = squfof(test); |
||
if ( factor == 0 ) { |
if ( factor == 0 ) { |
||
std::cout << " |
std::cout << test << " - failed to factorise" << std::endl; |
||
} else { |
} else { |
||
std::cout << " = " << factor << " * " << test / factor << std::endl; |
std::cout << test << " = " << factor << " * " << test / factor << std::endl; |
||
} |
} |
||
std::cout << std::endl; |
std::cout << std::endl; |
||
Line 463: | Line 462: | ||
{{ out }} |
{{ out }} |
||
<pre> |
<pre> |
||
822140815871714649 = 141 * 5830785928168189 |
|||
473377979025428817 = 3 * 157792659675142939 |
|||
482452941918160803 = 4410431 * 109389069213 |
|||
165380937127655630 = 65438 * 2527292049385 |
|||
191677853606692475 = 7589219 * 25256598025 |
|||
480551815975206727 = 2843 * 169029833265989 |
|||
178710207362206205 = 5 * 35742041472441241 |
|||
484660189375949842 = 1094 * 443016626486243 |
|||
758704390319635770 = 1605 * 472713015775474 |
|||
820453356193182720 = 97280 * 8433936638499 |
|||
706982627912630220 = 121273 * 5829678724140 |
|||
614913973550671312 = 437204432 * 1406467841 |
|||
601482456081568543 = 131 * 4591469130393653 |
|||
610533314488947626 = 14 * 43609522463496259 |
|||
336343281182924332 = 70108 * 4797502156429 |
|||
308127213282933401 = 7 * 44018173326133343 |
|||
582455924775519843 = 3 * 194151974925173281 |
|||
694215100094443276 = 32070628 * 21646445467 |
|||
398821795604697523 = 181 * 2203435334832583 |
|||
477964959783291032 = 517029608 * 924444079 |
|||
</pre> |
</pre> |
||