This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sage.stats.distributions.discrete_gaussian_lattice import DiscreteGaussianDistributionLatticeSampler | |
n = 256 | |
D = DiscreteGaussianDistributionLatticeSampler(ZZ^n, 3.0) | |
arr = [list(D()) for i in range(n)] | |
flat = flatten(list(arr)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
def generate_matrix(dimention, modulus): | |
array = [] | |
upper_limit = modulus * dimention | |
for i in range(0, dimention): | |
f = 0 | |
for j in range(0, dimention): | |
f = f + (randrange(modulus, upper_limit) * x^j) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ring ring1 = new Ring("x^2 + 23 *3y + x^3y^z"); | |
Ring ring2 = new Ring("x^2 + 23 *3y + x*3y+z"); | |
Ring ring3 = new Ring("x^2 + (23 *3y) + x^3y^z"); | |
Ring ring4 = new Ring("x^2 + (23 *(2 + x)*3y)+z"); | |
Ring ring5 = new Ring("2+16/2^4"); | |
Ring ring6 = new Ring("2+16/2^4*2"); | |
Ring ring7 = new Ring("2+16/2^4*2+(3-1*3-4^4^5)"); | |
Ring ring8 = new Ring("4^4^5"); | |
Ring ring9 = new Ring("4^4^5*3/3-1^4^5"); | |
Ring ring10 = new Ring("4^4^5*3/3-1^(4^5)"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Double N = new Double( | |
"16260595201356777876687102055392856230368799478725437225418970788404092751540966827614883675066492383688147288741223234174448378892794567789551235835087027626536919406320142455677084743499141155821894102610573207343199194327005172833989486958434982393556326206485954223151805798621294965926069728816780985683043030371485847746616146554612001066554175545753760388987584593091716701780398711910886679925612838955858736102229719042291682456480437908426849734556856917891628730543729446245974891735371991588505429152639045721840213451875487038496578525189542369448895368117152818687795094021869963915318643663536132393791"); | |
double delta = 0.26; | |
System.out.print(Math.pow(N.doubleValue(), delta)); |
NewerOlder