Skip to content

Instantly share code, notes, and snippets.

@RandyMcMillan
Last active December 5, 2018 04:56
Show Gist options
  • Select an option

  • Save RandyMcMillan/2e0159db5efcc9bbeb2e2ed3610d4101 to your computer and use it in GitHub Desktop.

Select an option

Save RandyMcMillan/2e0159db5efcc9bbeb2e2ed3610d4101 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/python3
#python3.7 largePrimesExample.py
#pip install gmpy2
import gmpy2
from gmpy2 import mpz,mpq,mpfr,mpc,div
global_partition = mpz(904625697166532776746648320380374280100293470930272690489102837043110636675);
first_prime = mpz(1623087694307053270266275330414301965675413090185657913);
second_prime = mpz(6119161);
third_prime = mpz(24371);
fourth_prime = mpz(2221);
fifth_prime = mpz(211);
sixth_prime = mpz(29);
seventh_prime = mpz(11);
eigth_prime = mpz(5*5);
print(div(mpz(904625697166532776746648320380374280100293470930272690489102837043110636675),mpz(1623087694307053270266275330414301965675413090185657913)));
print(div(global_partition,first_prime));
def returnGlobalPartition():
return mpz(904625697166532776746648320380374280100293470930272690489102837043110636675)
new = returnGlobalPartition();
print(new);
new2 = div(mpz(904625697166532776746648320380374280100293470930272690489102837043110636675),mpz(1623087694307053270266275330414301965675413090185657913))
print(new2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment