HOW IT WORKS ---------------- (108 examples toward the bottom of this file included q1, q2 such that max M_q is attained at q1, min m_q is attained at q2) --------------- More informations are also collected here: https://www.math.unipd.it/~languasc/Littlewood_ineq.html --------------- TABLES To generate the TABLES in the paper: use the gp scripts in the gp directory (see the examples towards the bottom of each .gp file there) --------------------- THEOREMS 1 - 2 VERIFICATION: AUXILIARY SW TO BE INSTALLED: PYTHON v3 needed with PANDAS module To verify Theorems 1 and 2 using the already computed maxL.csv and minL.csv files present in the directories Th1-2-verif/maxL; Th1-2-verif/minL Run the python scripts in the directories Th1-2-verif/maxL; Th1-2-verif/minL python3 analysis-MaxL.py python3 analysis-MinL.py the output files are contained in analysis.txt in each subdirectory. --------------- C PROGRAMS AND SCRIPTS We describe here how to use the C programs and the bash script; the attached example is just with 108 primes; see below. AUXILIARY SW TO BE INSTALLED: gcc, parigp, gp2c, fftw --------------- SOURCE CODES: a) file MaxLMinL_main.c: (C program) input: an odd prime q (it is checked that q is prime and odd) output: file primroot.res: first line q; second line g, a primitive root mod q It calls the mainMaxLMinL.c program (interface with parigp) to generate the primitive root mod q b) file MaxLMinL-fftwl-inplace.c: (C program) reads the file primroot.res, computes the FFT (inplace transform) and gets maxL(q) and minL(q) b1) file MaxLMinL-fftwl-outplace.c: (C program) same as before but it uses the outplace transform. c) compile the programs and link the libraries (machine dependent) via gp2c in the directory C_programs - UBUNTU 18.04.5 (gp and gp2c compiled from source; fftw installed with apt install libfftw3-3 libfftw3-dev) gp2c -pmy_ -g mainMaxLMinL.gp >mainMaxLMinL.gp.c /usr/bin/gcc -c -o mainMaxLMinL.gp.o -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\" mainMaxLMinL.gp.c && /usr/bin/gcc -o mainMaxLMinL.gp.so -shared -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -Wl,-shared mainMaxLMinL.gp.o -lc -lm -L/usr/local/lib -lpari /usr/bin/gcc MaxLMinL_main.c mainMaxLMinL.gp.o -g -O3 -Wall -Wno-unused-result -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\"-lgmp -L/usr/local/lib -lpari -o MaxLMinL_main.exe /usr/bin/gcc -o MaxLMinL-fftwl-outplace.exe MaxLMinL-fftwl-outplace.c -lfftw3l -lm /usr/bin/gcc -o MaxLMinL-fftwl-inplace.exe MaxLMinL-fftwl-inplace.c -lfftw3l -lm - MACOS X - XI (gp and gp2c compiled from source; fftw installed with homebrew) gp2c -pmy_ -g mainMaxLMinL.gp >mainMaxLMinL.gp.c /usr/bin/gcc -c -o mainMaxLMinL.gp.o -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\" mainMaxLMinL.gp.c && /usr/bin/gcc -o mainMaxLMinL.gp.so -bundle -undefined dynamic_lookup -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC mainMaxLMinL.gp.o /usr/bin/gcc MaxLMinL_main.c mainMaxLMinL.gp.o -g -O3 -Wall -Wno-unused-result -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\"-lgmp -L/usr/local/lib -lpari -o MaxLMinL_main.exe /usr/bin/gcc -o MaxLMinL-fftwl-outplace.exe MaxLMinL-fftwl-outplace.c -lfftw3l -lm /usr/bin/gcc -o MaxLMinL-fftwl-inplace.exe MaxLMinL-fftwl-inplace.c -lfftw3l -lm d) to obtain the files in the result directory: such programs were run using the bash run_maxLminL.sh that 1) count how many primes are listed in a txt file named primes.txt 2) read the first prime "q" in the file named primes.txt 3) create a subdirectory named "P_q" (q is the prime number previously read) 4) run MaxLMinL_main.exe (with the prime q previously read) 5) run MaxLMinL-fftwl-inplace.exe (reads the file P_q/primroot.res; the output on files q_MinL.csv; q_MaxL.csv; q_comput_time.csv 5bis) if you want to use the outplace transforms, change "MaxLMinL-fftwl-inplace" with "MaxLMinL-fftwl-outplace" in the script 6) write in the .. directory the results on MaxL.csv and MinL.csv; computing time written in comput_time.csv 7) check if we used all the listed primes; if not go to 1) 8) quit the bash script --------------------- REMARKS: 1) The files in the result directory uses a primes.txt file that contains all the odd primes up to 10^7 [WARNING: very long execution]; the provided primes.txt file is just for an example; it contains the primes in [19000,20000], 30011, 83089, 991027, (minL attained here) 4305479 (maxL attained here). The running time of this example is about 10 seconds. 2) the inplace trasforms are used; if on some q it gives a runtime error, rerun such case with the outplace transform (which is more reliable; but requires more RAM) --------------------- --------------------------------------- EXAMPLE: with 108 primes; the ones in [19000,20000], 30011, 83089, 991027, (minL attained here) 4305479 (maxL attained here) listed in the included file primes.txt languasc@languasco1:~/MaxMinL$ uname -a Linux languasco1 4.15.0-129-generic #132-Ubuntu SMP Thu Dec 10 14:02:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux languasc@languasco1:~/MaxMinL/C_programs$ gp2c -pmy_ -g mainMaxLMinL.gp >mainMaxLMinL.gp.c languasc@languasco1:~/MaxMinL/C_programs$ /usr/bin/gcc -c -o mainMaxLMinL.gp.o -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\" mainMaxLMinL.gp.c && /usr/bin/gcc -o mainMaxLMinL.gp.so -shared -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -Wl,-shared mainMaxLMinL.gp.o -lc -lm -L/usr/local/lib -lpari languasc@languasco1:~/MaxMinL/C_programs$ /usr/bin/gcc MaxLMinL_main.c mainMaxLMinL.gp.o -g -O3 -Wall -Wno-unused-result -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\"-lgmp -L/usr/local/lib -lpari -o MaxLMinL_main.exe languasc@languasco1:~/MaxMinL/C_programs$ /usr/bin/gcc -o MaxLMinL-fftwl-inplace.exe MaxLMinL-fftwl-inplace.c -lfftw3l -lm languasc@languasco1:~/MaxMinL/C_programs$ cd .. languasc@languasco1:~/MaxMinL$ chmod 755 run_maxLminL.sh languasc@languasco1:~/MaxMinL$ ./run_maxLminL.sh ******************************** ********* A. LANGUASCO ********* ******************************** **** Computation of Max |L(1,chi)| and min |L(1,chi)| **** **** chi mod q, non principal, q odd prime in the list contained in primes.txt **** **** results for each prime saved in subdirectories P_q **** **** summary results in this directory in MaxL.csv and MinL.csv **** Total numer of primes = 108 **** start script **** prime counter = 1 over 108 prime counter = 2 over 108 prime counter = 3 over 108 prime counter = 4 over 108 prime counter = 5 over 108 prime counter = 6 over 108 prime counter = 7 over 108 prime counter = 8 over 108 prime counter = 9 over 108 prime counter = 10 over 108 prime counter = 11 over 108 prime counter = 12 over 108 prime counter = 13 over 108 prime counter = 14 over 108 prime counter = 15 over 108 prime counter = 16 over 108 prime counter = 17 over 108 prime counter = 18 over 108 prime counter = 19 over 108 prime counter = 20 over 108 prime counter = 21 over 108 prime counter = 22 over 108 prime counter = 23 over 108 prime counter = 24 over 108 prime counter = 25 over 108 prime counter = 26 over 108 prime counter = 27 over 108 prime counter = 28 over 108 prime counter = 29 over 108 prime counter = 30 over 108 prime counter = 31 over 108 prime counter = 32 over 108 prime counter = 33 over 108 prime counter = 34 over 108 prime counter = 35 over 108 prime counter = 36 over 108 prime counter = 37 over 108 prime counter = 38 over 108 prime counter = 39 over 108 prime counter = 40 over 108 prime counter = 41 over 108 prime counter = 42 over 108 prime counter = 43 over 108 prime counter = 44 over 108 prime counter = 45 over 108 prime counter = 46 over 108 prime counter = 47 over 108 prime counter = 48 over 108 prime counter = 49 over 108 prime counter = 50 over 108 prime counter = 51 over 108 prime counter = 52 over 108 prime counter = 53 over 108 prime counter = 54 over 108 prime counter = 55 over 108 prime counter = 56 over 108 prime counter = 57 over 108 prime counter = 58 over 108 prime counter = 59 over 108 prime counter = 60 over 108 prime counter = 61 over 108 prime counter = 62 over 108 prime counter = 63 over 108 prime counter = 64 over 108 prime counter = 65 over 108 prime counter = 66 over 108 prime counter = 67 over 108 prime counter = 68 over 108 prime counter = 69 over 108 prime counter = 70 over 108 prime counter = 71 over 108 prime counter = 72 over 108 prime counter = 73 over 108 prime counter = 74 over 108 prime counter = 75 over 108 prime counter = 76 over 108 prime counter = 77 over 108 prime counter = 78 over 108 prime counter = 79 over 108 prime counter = 80 over 108 prime counter = 81 over 108 prime counter = 82 over 108 prime counter = 83 over 108 prime counter = 84 over 108 prime counter = 85 over 108 prime counter = 86 over 108 prime counter = 87 over 108 prime counter = 88 over 108 prime counter = 89 over 108 prime counter = 90 over 108 prime counter = 91 over 108 prime counter = 92 over 108 prime counter = 93 over 108 prime counter = 94 over 108 prime counter = 95 over 108 prime counter = 96 over 108 prime counter = 97 over 108 prime counter = 98 over 108 prime counter = 99 over 108 prime counter = 100 over 108 prime counter = 101 over 108 prime counter = 102 over 108 prime counter = 103 over 108 prime counter = 104 over 108 prime counter = 105 over 108 prime counter = 106 over 108 prime counter = 107 over 108 prime counter = 108 over 108 **** end script **** Total of 8 seconds elapsed for script [this is larger than the actual computation time, see the comput_time.csv file] ********************************