import time
import sys, os
#sys.path.append('../')
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from producer.primeNumbers import *
from worker.factorizeInteger import * 

bits = 45 # default 

if len(sys.argv) > 1:
  bits = int(sys.argv[1])

st = time.time()
p1 = generateLargePrime(bits)
et = time.time()
print(f'p1 = {p1} ({et - st} s)')

st = time.time()
p2 = generateLargePrime(bits)
et = time.time()
print(f'p2 = {p2} ({et - st} s)')

pp = p1 * p2
print(f'product of primes p1 * p2: {pp}')

st = time.time()
f = factorize(pp)
et = time.time()
print(f'factors of p1 * p2 are: {f} ({et - st} s)')





abf15f974770eb6b80b8c532d114373cc74f0fe6
<mask token>

<mask token>
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
<mask token>
if len(sys.argv) > 1:
    bits = int(sys.argv[1])
<mask token>
print(f'p1 = {p1} ({et - st} s)')
<mask token>
print(f'p2 = {p2} ({et - st} s)')
<mask token>
print(f'product of primes p1 * p2: {pp}')
<mask token>
print(f'factors of p1 * p2 are: {f} ({et - st} s)')

<mask token>
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
<mask token>
bits = 45
if len(sys.argv) > 1:
    bits = int(sys.argv[1])
st = time.time()
p1 = generateLargePrime(bits)
et = time.time()
print(f'p1 = {p1} ({et - st} s)')
st = time.time()
p2 = generateLargePrime(bits)
et = time.time()
print(f'p2 = {p2} ({et - st} s)')
pp = p1 * p2
print(f'product of primes p1 * p2: {pp}')
st = time.time()
f = factorize(pp)
et = time.time()
print(f'factors of p1 * p2 are: {f} ({et - st} s)')

import time
import sys, os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from producer.primeNumbers import *
from worker.factorizeInteger import *
bits = 45
if len(sys.argv) > 1:
    bits = int(sys.argv[1])
st = time.time()
p1 = generateLargePrime(bits)
et = time.time()
print(f'p1 = {p1} ({et - st} s)')
st = time.time()
p2 = generateLargePrime(bits)
et = time.time()
print(f'p2 = {p2} ({et - st} s)')
pp = p1 * p2
print(f'product of primes p1 * p2: {pp}')
st = time.time()
f = factorize(pp)
et = time.time()
print(f'factors of p1 * p2 are: {f} ({et - st} s)')

import time
import sys, os
#sys.path.append('../')
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from producer.primeNumbers import *
from worker.factorizeInteger import * 

bits = 45 # default 

if len(sys.argv) > 1:
  bits = int(sys.argv[1])

st = time.time()
p1 = generateLargePrime(bits)
et = time.time()
print(f'p1 = {p1} ({et - st} s)')

st = time.time()
p2 = generateLargePrime(bits)
et = time.time()
print(f'p2 = {p2} ({et - st} s)')

pp = p1 * p2
print(f'product of primes p1 * p2: {pp}')

st = time.time()
f = factorize(pp)
et = time.time()
print(f'factors of p1 * p2 are: {f} ({et - st} s)')




