File indexing completed on 2026-11-07 10:15:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ACB_MODULAR_H
0013 #define ACB_MODULAR_H
0014
0015 #ifdef ACB_MODULAR_INLINES_C
0016 #define ACB_MODULAR_INLINE
0017 #else
0018 #define ACB_MODULAR_INLINE static inline
0019 #endif
0020
0021 #include "fmpz.h"
0022 #include "acb_types.h"
0023
0024 #ifdef __cplusplus
0025 extern "C" {
0026 #endif
0027
0028 typedef struct
0029 {
0030 fmpz a;
0031 fmpz b;
0032 fmpz c;
0033 fmpz d;
0034 }
0035 psl2z_struct;
0036
0037 typedef psl2z_struct psl2z_t[1];
0038
0039 ACB_MODULAR_INLINE void
0040 psl2z_init(psl2z_t g)
0041 {
0042 fmpz_init(&g->a);
0043 fmpz_init(&g->b);
0044 fmpz_init(&g->c);
0045 fmpz_init(&g->d);
0046 fmpz_one(&g->a);
0047 fmpz_one(&g->d);
0048 }
0049
0050 ACB_MODULAR_INLINE void
0051 psl2z_clear(psl2z_t g)
0052 {
0053 fmpz_clear(&g->a);
0054 fmpz_clear(&g->b);
0055 fmpz_clear(&g->c);
0056 fmpz_clear(&g->d);
0057 }
0058
0059 ACB_MODULAR_INLINE void
0060 psl2z_swap(psl2z_t f, psl2z_t g)
0061 {
0062 FLINT_SWAP(psl2z_struct, *f, *g);
0063 }
0064
0065 ACB_MODULAR_INLINE void
0066 psl2z_set(psl2z_t h, const psl2z_t g)
0067 {
0068 fmpz_set(&h->a, &g->a);
0069 fmpz_set(&h->b, &g->b);
0070 fmpz_set(&h->c, &g->c);
0071 fmpz_set(&h->d, &g->d);
0072 }
0073
0074 ACB_MODULAR_INLINE void
0075 psl2z_one(psl2z_t g)
0076 {
0077 fmpz_one(&g->a);
0078 fmpz_zero(&g->b);
0079 fmpz_zero(&g->c);
0080 fmpz_one(&g->d);
0081 }
0082
0083 #ifdef FLINT_HAVE_FILE
0084 void psl2z_fprint(FILE * file, const psl2z_t g);
0085 #endif
0086
0087 void psl2z_print(const psl2z_t g);
0088
0089 ACB_MODULAR_INLINE int
0090 psl2z_equal(const psl2z_t f, const psl2z_t g)
0091 {
0092 return fmpz_equal(&f->a, &g->a)
0093 && fmpz_equal(&f->b, &g->b)
0094 && fmpz_equal(&f->c, &g->c)
0095 && fmpz_equal(&f->d, &g->d);
0096 }
0097
0098 void psl2z_mul(psl2z_t h, const psl2z_t f, const psl2z_t g);
0099
0100 void psl2z_inv(psl2z_t h, const psl2z_t g);
0101
0102 int psl2z_is_one(const psl2z_t g);
0103
0104 int psl2z_is_correct(const psl2z_t g);
0105
0106 void psl2z_randtest(psl2z_t g, flint_rand_t state, slong bits);
0107
0108 void acb_modular_transform(acb_t w, const psl2z_t g, const acb_t z, slong prec);
0109
0110 void acb_modular_fundamental_domain_approx_d(psl2z_t g,
0111 double x, double y, double one_minus_eps);
0112
0113 void acb_modular_fundamental_domain_approx_arf(psl2z_t g,
0114 const arf_t xx, const arf_t yy, const arf_t one_minus_eps, slong prec);
0115
0116 void acb_modular_fundamental_domain_approx(acb_t w, psl2z_t g, const acb_t z,
0117 const arf_t one_minus_eps, slong prec);
0118
0119 int acb_modular_is_in_fundamental_domain(const acb_t z, const arf_t tol, slong prec);
0120
0121 void acb_modular_addseq_theta(slong * exponents, slong * aindex, slong * bindex, slong num);
0122
0123 void acb_modular_addseq_eta(slong * exponents, slong * aindex, slong * bindex, slong num);
0124
0125 void acb_modular_fill_addseq(slong * tab, slong len);
0126
0127 void acb_modular_theta_transform(int * R, int * S, int * C, const psl2z_t g);
0128
0129 void acb_modular_theta_const_sum(acb_t theta2, acb_t theta3, acb_t theta4,
0130 const acb_t q, slong prec);
0131
0132 void acb_modular_theta_const_sum_basecase(acb_t theta2, acb_t theta3, acb_t theta4,
0133 const acb_t q, slong N, slong prec);
0134
0135 void acb_modular_theta_const_sum_rs(acb_t theta2, acb_t theta3, acb_t theta4,
0136 const acb_t q, slong N, slong prec);
0137
0138 void acb_modular_theta_sum(acb_ptr theta1, acb_ptr theta2,
0139 acb_ptr theta3, acb_ptr theta4,
0140 const acb_t w, int w_is_unit, const acb_t q, slong len, slong prec);
0141
0142 void acb_modular_theta_notransform(acb_t theta1, acb_t theta2,
0143 acb_t theta3, acb_t theta4, const acb_t z, const acb_t tau,
0144 slong prec);
0145
0146 void acb_modular_theta(acb_t theta1, acb_t theta2,
0147 acb_t theta3, acb_t theta4, const acb_t z, const acb_t tau,
0148 slong prec);
0149
0150 void acb_modular_theta_jet_notransform(acb_ptr theta1, acb_ptr theta2,
0151 acb_ptr theta3, acb_ptr theta4, const acb_t z, const acb_t tau,
0152 slong len, slong prec);
0153
0154 void acb_modular_theta_jet(acb_ptr theta1, acb_ptr theta2,
0155 acb_ptr theta3, acb_ptr theta4, const acb_t z, const acb_t tau,
0156 slong len, slong prec);
0157
0158 void _acb_modular_theta_series(acb_ptr theta1, acb_ptr theta2, acb_ptr theta3, acb_ptr theta4,
0159 acb_srcptr z, slong zlen, const acb_t tau, slong len, slong prec);
0160
0161 void acb_modular_theta_series(acb_poly_t theta1, acb_poly_t theta2,
0162 acb_poly_t theta3, acb_poly_t theta4, const acb_poly_t z, const acb_t tau,
0163 slong len, slong prec);
0164
0165 void acb_modular_j(acb_t z, const acb_t tau, slong prec);
0166
0167 int acb_modular_epsilon_arg(const psl2z_t g);
0168
0169 void acb_modular_eta_sum(acb_t eta, const acb_t q, slong prec);
0170
0171 void acb_modular_eta(acb_t z, const acb_t tau, slong prec);
0172
0173 void acb_modular_lambda(acb_t r, const acb_t tau, slong prec);
0174
0175 void acb_modular_delta(acb_t r, const acb_t tau, slong prec);
0176
0177 void acb_modular_eisenstein(acb_ptr r, const acb_t tau, slong len, slong prec);
0178
0179 void acb_modular_elliptic_p(acb_t r, const acb_t z, const acb_t tau, slong prec);
0180
0181 void acb_modular_elliptic_p_zpx(acb_ptr r, const acb_t z, const acb_t tau, slong len, slong prec);
0182
0183 void acb_modular_elliptic_k(acb_t k, const acb_t m, slong prec);
0184
0185 void acb_modular_elliptic_k_cpx(acb_ptr w, const acb_t m, slong len, slong prec);
0186
0187 void acb_modular_elliptic_e(acb_t res, const acb_t m, slong prec);
0188
0189 void acb_modular_hilbert_class_poly(fmpz_poly_t res, slong D);
0190
0191
0192 void _acb_modular_mul(acb_t z, acb_t tmp1, acb_t tmp2, const acb_t x, const acb_t y, slong wprec, slong prec);
0193
0194 #ifdef __cplusplus
0195 }
0196 #endif
0197
0198 #endif