🕵️♂️
This file contains hidden or 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
| /* | |
| * Demonstration of qqbar_sgn_re from FLINT. | |
| * | |
| * We construct three sums of nontrivial complex algebraic numbers whose | |
| * real parts are negative, zero, and positive respectively, using roots | |
| * of unity via qqbar_root_of_unity(res, p, q) = exp(2*pi*i * p/q). | |
| * | |
| * Example 1 (negative): | |
| * zeta_3 + zeta_3^2 = e^(2pi*i/3) + e^(2pi*i*2/3) | |
| * Each summand is a primitive cube root of unity with Re = -1/2. |
This file contains hidden or 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
| #define _POSIX_C_SOURCE 199309L | |
| #include <immintrin.h> | |
| #include "profiler.h" | |
| #include "nmod_poly.h" | |
| #include "ulong_extras.h" | |
| #include "nmod.h" | |
| void n_poly_mul_n_classical(ulong * c, const ulong * a, const ulong * b, slong n) | |
| { |
This file contains hidden or 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
| #include <pthread.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include "flint.h" | |
| #include "ulong_extras.h" | |
| #include "profiler.h" | |
| #include "thread_support.h" | |
| #define NUM_PSEUDOPRIMES 31894014 |
This file contains hidden or 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
| #include "padic.h" | |
| #include "nmod.h" | |
| #include "gr.h" | |
| typedef struct | |
| { | |
| ulong p; | |
| slong n; | |
| nmod_t p_mod; |
This file contains hidden or 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
| #include "ulong_extras.h" | |
| #include "nmod.h" | |
| #include "fmpz.h" | |
| #include "thread_support.h" | |
| #define N_FAST1 UWORD(1000000) | |
| #define N_FAST2 UWORD(100000000) | |
| #define N_SLOW UWORD(10000000000000000000) | |
| ulong * tab1; |
This file contains hidden or 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
| \documentclass[tikz,border=0.3mm]{standalone} | |
| \usepackage{tikz,ifthen} | |
| \usepackage{contour} | |
| \usepackage{arrayjob} | |
| \begin{document} | |
| \begin{tikzpicture}[scale=2.5, every node/.style={transform shape}, every draw/.style={transform shape}] | |
| \definecolor{gray55} {HTML}{555555} | |
| \definecolor{gray44} {HTML}{444444} |
This file contains hidden or 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
| #include "gr.h" | |
| #include "arf.h" | |
| #include "mpn_extras.h" | |
| #include "crt_helpers.h" | |
| typedef struct | |
| { | |
| slong sign; | |
| slong exp; | |
| mp_limb_t d[4]; |
This file contains hidden or 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
| #include <math.h> | |
| #include "longlong.h" | |
| #include "ulong_extras.h" | |
| #include "mpn_extras.h" | |
| #include "arf.h" | |
| #include "arb.h" | |
| #include "profiler.h" | |
| /* util: print fixed-point number given by n limbs where fracn limbs are fractional. */ | |
| void |
This file contains hidden or 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
| #include <stdint.h> | |
| #include "profiler.h" | |
| #include "mpn_extras.h" | |
| #include "crt_helpers.h" | |
| #include "ulong_extras.h" | |
| FLINT_FORCE_INLINE mp_limb_t | |
| flint_mpn_inline_addmul_1(mp_ptr res, mp_srcptr a, mp_size_t n, mp_limb_t c) | |
| { | |
| mp_limb_t hi, lo, cy_limb; |
This file contains hidden or 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
| #include <x86intrin.h> | |
| #include "flint.h" | |
| #include "longlong.h" | |
| #include "ulong_extras.h" | |
| #include "mpn_extras.h" | |
| #include "profiler.h" | |
| #define umul_ppmm_mulx(w1, w0, u, v) \ | |
| __asm__ ("mulx\t%3, %q0, %q1" \ | |
| : "=r" (w0), "=r" (w1) \ |
NewerOlder