def type_2_bounds(self): """generate the type 2 bounds table""" output_str = ( r"${d}$ & ${Delta_K}$ & ${label}$ & ${rem} \times 10^{{{exp_at_10}}}$\\" ) latex_output = [] for d in range(2, self.range + 1): Delta_K, f_K, K, label = get_smallest_good_number_field(d) type_2_bound = RR(get_type_2_bound(K)) log_type_2_bound = type_2_bound.log10() exp_at_10 = int(log_type_2_bound) rem = log_type_2_bound - exp_at_10 rem = 10 ** rem rem = rem.numerical_approx(digits=3) lmfdb_link = LMFDB_NF_URL_TRUNK.format(label) lmfdb_link_latex = r"\href{{{the_link}}}{{{my_text}}}".format( the_link=lmfdb_link, my_text=label ) output_here = output_str.format( d=d, Delta_K=Delta_K, label=lmfdb_link_latex, rem=rem, exp_at_10=exp_at_10, ) latex_output.append(output_here) for one_line in latex_output: print(one_line)
def dlmv_table(self): """generate the dlmv table""" output_str = ( r"${Delta_K}$ & $\Q(\sqrt{{{D}}})$ & ${rem} \times 10^{{{exp_at_10}}}$\\" ) for D in range(-self.range, self.range + 1): if Integer(D).is_squarefree(): if not D in CLASS_NUMBER_ONE_DISCS: if D != 1: K = QuadraticField(D) Delta_K = K.discriminant() dlmv_bound = RR(DLMV(K)) log_dlmv_bound = dlmv_bound.log10() exp_at_10 = int(log_dlmv_bound) rem = log_dlmv_bound - exp_at_10 rem = 10**rem rem = rem.numerical_approx(digits=3) output_here = output_str.format(Delta_K=Delta_K, D=D, rem=rem, exp_at_10=exp_at_10) print(output_here)