[SCM] lcalc: program for computing zeros and values of L-functions branch, master, updated. debian/0.0.20080205-1.2-15-gb903849

Tobias Hansen tobias.han at gmx.de
Sat Jan 12 03:33:28 UTC 2013


The following commit has been merged in the master branch:
commit 4ee6ea9dad21634b016934cbc0efbc2befa55986
Author: Tobias Hansen <tobias.han at gmx.de>
Date:   Sat Jan 12 02:28:27 2013 +0100

    Refresh patches.

diff --git a/debian/patches/gcc.patch b/debian/patches/gcc.patch
index bdcfe75..532da1a 100644
--- a/debian/patches/gcc.patch
+++ b/debian/patches/gcc.patch
@@ -1,7 +1,5 @@
-Index: lcalc-0.0.20080205/src/Lglobals.cc
-===================================================================
---- lcalc-0.0.20080205.orig/src/Lglobals.cc	2011-08-14 15:40:07.580779750 +0200
-+++ lcalc-0.0.20080205/src/Lglobals.cc	2011-08-14 15:43:45.080786413 +0200
+--- a/src/Lglobals.cc
++++ b/src/Lglobals.cc
 @@ -21,6 +21,7 @@
  */
  
@@ -10,22 +8,3 @@ Index: lcalc-0.0.20080205/src/Lglobals.cc
  
  
  //-----Global variables---------------------------------------
-Index: lcalc-0.0.20080205/include/Lcommon.h
-===================================================================
---- lcalc-0.0.20080205.orig/include/Lcommon.h	2011-08-14 15:43:54.724786708 +0200
-+++ lcalc-0.0.20080205/include/Lcommon.h	2011-08-14 15:44:03.524786973 +0200
-@@ -26,10 +26,10 @@
- inline double to_double(const double& x) { return x; }
- #endif
- //inline double to_double(const long double& x) { return x; }
--inline double to_double(const int& x) { return x; }
--inline double to_double(const long long& x) { return x; }
--inline double to_double(const short& x) { return x; }
--inline double to_double(const char& x) { return x; }
-+//inline double to_double(const int& x) { return x; }
-+//inline double to_double(const long long& x) { return x; }
-+//inline double to_double(const short& x) { return x; }
-+//inline double to_double(const char& x) { return x; }
- #define Int(x) (int)(to_double(x))
- #define Long(x) (Long)(to_double(x))
- #define double(x) (double)(to_double(x))
diff --git a/debian/patches/lcalc-const-fixes.patch b/debian/patches/lcalc-const-fixes.patch
index a7b0142..d90b23e 100644
--- a/debian/patches/lcalc-const-fixes.patch
+++ b/debian/patches/lcalc-const-fixes.patch
@@ -1,233 +1,18 @@
-diff -ur lcalc-0.0.20080205/include/cmdline.h tmp/lcalc-0.0.20080205/include/cmdline.h
---- lcalc-0.0.20080205/include/cmdline.h	2008-02-05 17:23:23.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/include/cmdline.h	2008-04-13 22:25:19.000000000 -0400
-@@ -149,7 +149,7 @@
+--- a/include/cmdline.h
++++ b/include/cmdline.h
+@@ -320,7 +320,7 @@
+ int cmdline_parser_required (struct gengetopt_args_info *args_info,
+   const char *prog_name);
  
- int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name);
- 
--extern char *cmdline_parser_output_character_values[] ;	/* Possible values for output-character.  */
-+extern const char *cmdline_parser_output_character_values[] ;	/* Possible values for output-character.  */
+-extern char *cmdline_parser_output_character_values[] ;	/**< @brief Possible values for output-character.  */
++extern const char *cmdline_parser_output_character_values[] ;	/**< @brief Possible values for output-character.  */
  
  
  #ifdef __cplusplus
-diff -ur lcalc-0.0.20080205/include/getopt.h tmp/lcalc-0.0.20080205/include/getopt.h
---- lcalc-0.0.20080205/include/getopt.h	2005-06-12 16:34:19.000000000 -0400
-+++ tmp/lcalc-0.0.20080205/include/getopt.h	2008-04-13 22:25:19.000000000 -0400
-@@ -144,7 +144,9 @@
-    errors, only prototype getopt for the GNU C library.  */
- extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
- # else /* not __GNU_LIBRARY__ */
-+#if !(defined __sun)
- extern int getopt ();
-+#endif
- # endif /* __GNU_LIBRARY__ */
- 
- # ifndef __need_getopt
-diff -ur lcalc-0.0.20080205/include/Lcommandline_twist.h tmp/lcalc-0.0.20080205/include/Lcommandline_twist.h
---- lcalc-0.0.20080205/include/Lcommandline_twist.h	2005-11-22 01:10:45.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/include/Lcommandline_twist.h	2008-04-13 22:25:19.000000000 -0400
-@@ -31,7 +31,7 @@
- 
- //===============functions================================================
- 
--int quadratic_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size,char *what_to_do,bool do_only_even_twists,int desired_rank=-1);
--int all_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size,char *what_to_do,int twist_type,int print_character);
-+int quadratic_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size, const char *what_to_do,bool do_only_even_twists,int desired_rank=-1);
-+int all_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size, const char *what_to_do,int twist_type,int print_character);
- 
- #endif
-diff -ur lcalc-0.0.20080205/include/Lcommandline_values_zeros.h tmp/lcalc-0.0.20080205/include/Lcommandline_values_zeros.h
---- lcalc-0.0.20080205/include/Lcommandline_values_zeros.h	2005-06-12 16:34:19.000000000 -0400
-+++ tmp/lcalc-0.0.20080205/include/Lcommandline_values_zeros.h	2008-04-13 22:25:19.000000000 -0400
-@@ -30,7 +30,7 @@
- 
- 
- //-----functions--------------------------------------------------------------
--void compute_values(Double x,Double y,char *file_name="",Double x3=0,Double y3=0,Long count=0);
-+void compute_values(Double x,Double y,const char *file_name="",Double x3=0,Double y3=0,Long count=0);
- void compute_zeros(Double x, Double y,Double step_size, Long count=0,int rank=-1);
- void L_interpolate(Double x, Double y,Double step_size, int n=1000);
- 
-diff -ur lcalc-0.0.20080205/include/Lfind_zeros.h tmp/lcalc-0.0.20080205/include/Lfind_zeros.h
---- lcalc-0.0.20080205/include/Lfind_zeros.h	2008-01-31 22:48:25.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/include/Lfind_zeros.h	2008-04-13 22:25:19.000000000 -0400
-@@ -95,7 +95,7 @@
- 
-     template <class ttype>
-     void L_function <ttype>::
--    find_zeros(Double t1, Double t2, Double step_size, char* filename, char* message_stamp)
-+    find_zeros(Double t1, Double t2, Double step_size, const char* filename, const char* message_stamp)
-     {
-         Double t,x,y;
-         Double u,v,tmp2;
-@@ -181,7 +181,7 @@
-     //find zeros using gram points and Rosser's rule. Not used by package.
-     template <class ttype>
-     void L_function <ttype>::
--    find_zeros_via_gram(Double t1, Long count,Double max_refine,char* filename, char* message_stamp){
-+    find_zeros_via_gram(Double t1, Long count,Double max_refine,const char* filename, const char* message_stamp){
- 
-         //find_zeros_elaborate(t1,count,max_refine);
-  cout <<"GRAM POINT ZERO FINDER"<< endl;
-@@ -407,7 +407,7 @@
-     //Latter must be used if the L-function has complex coefficients.
-     template <class ttype>
-     void L_function <ttype>::
--    find_zeros_via_N(Long count,bool do_negative,Double max_refine, int rank,char* filename, char* message_stamp)
-+    find_zeros_via_N(Long count,bool do_negative,Double max_refine, int rank, const char* filename, const char* message_stamp)
-     {
- 
- 
-@@ -811,7 +811,7 @@
-     //if they are detected via N(T) comparison.
-     template <class ttype>
-     void L_function <ttype>::
--    find_zeros_elaborate(Double t1, Long count,Double max_refine,char* filename, char* message_stamp)
-+    find_zeros_elaborate(Double t1, Long count,Double max_refine, const char* filename, const char* message_stamp)
-     {
-         Double t,x,y;
-         Double r;
-diff -ur lcalc-0.0.20080205/include/Lgamma.h tmp/lcalc-0.0.20080205/include/Lgamma.h
---- lcalc-0.0.20080205/include/Lgamma.h	2008-02-05 15:18:27.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/include/Lgamma.h	2008-04-13 23:03:32.000000000 -0400
-@@ -29,6 +29,7 @@
- #include "Lmisc.h"
- #include <iomanip>          //for manipulating output such as setprecision
- #include <iostream>         //for ostrstream
-+#include <cstring>
- //using namespace std;
- 
- 
-@@ -43,7 +44,7 @@
- 
- //computes G(z,w)
- template <class ttype>
--Complex inc_GAMMA (ttype z,ttype w, char *method="temme", ttype exp_w = 0, bool recycle=false);  //computes G(z,w)
-+Complex inc_GAMMA (ttype z,ttype w, const char *method="temme", ttype exp_w = 0, bool recycle=false);  //computes G(z,w)
- 
- template <class ttype>
- ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w = 0, bool recycle=false);  //computes G(z,w) via asymptotic series
-@@ -67,7 +68,7 @@
- Complex erfc2(Complex z);
- 
- template <class ttype>
--Complex gamma_sum(Complex s, int what_type,ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, char *method="temme");
-+Complex gamma_sum(Complex s, int what_type,ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, const char *method="temme");
- //computes a sum of G(z,w)'s (as in (3.3.20)).
- 
- Complex exp_recycle();
-@@ -229,7 +230,7 @@
- //value exp_w which holds exp(-w)
- //computes G(z,w), so there's an extra w^(-z) factor.
- template <class ttype>
--Complex inc_GAMMA (ttype z,ttype w, char *method="temme", ttype exp_w = 0, bool recycle=false)
-+Complex inc_GAMMA (ttype z,ttype w, const char *method="temme", ttype exp_w = 0, bool recycle=false)
- {
- 
-     Complex G;
-@@ -603,7 +604,7 @@
- }
- 
- template <class ttype>
--Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, char *method="temme")
-+Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, const char *method="temme")
- {
-     Complex SUM=0;
- 
-diff -ur lcalc-0.0.20080205/include/L.h tmp/lcalc-0.0.20080205/include/L.h
---- lcalc-0.0.20080205/include/L.h	2008-02-05 17:26:29.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/include/L.h	2008-04-13 22:25:19.000000000 -0400
-@@ -125,7 +125,7 @@
- 
- 
-     //-----Constructor: initialize the L-function from given data------------------
--    L_function (char *NAME, int what_type, int N, ttype *coeff, long long Period,
-+    L_function (const char *NAME, int what_type, int N, ttype *coeff, long long Period,
-     Double q,  Complex w, int A, Double *g, Complex *l,
-     int n_poles, Complex *p, Complex *r)
-     {
-@@ -187,7 +187,7 @@
-     }
- 
-     //-----Constructor: initialize the L-function from given data------------------
--    L_function (char *NAME, int what_type, int N, ttype *coeff, long long Period,
-+    L_function (const char *NAME, int what_type, int N, ttype *coeff, long long Period,
-     Double q,  Complex w, int A, Double *g, Complex *l)
-     {
-         if(my_verbose>1)
-@@ -492,18 +492,18 @@
- 
-     //#include "Lvalue.h"         //value via Riemann sum, via gamma sum, various options for value
-     Complex find_delta(Complex s,Double g);
--    Complex value_via_Riemann_sum(Complex s,char *return_type="pure");
--    Complex value_via_gamma_sum(Complex s, char *return_type="pure");
--    Complex value(Complex s, int derivative = 0, char *return_type="pure");
-+    Complex value_via_Riemann_sum(Complex s, const char *return_type="pure");
-+    Complex value_via_gamma_sum(Complex s, const char *return_type="pure");
-+    Complex value(Complex s, int derivative = 0, const char *return_type="pure");
- 
-     //#include "Lfind_zeros.h"    //finding zeros routine
-     Double zeros_zoom_brent(Double L1, Double L2, Double u, Double v);
--    void find_zeros(Double t1, Double t2, Double step_size, char* filename="cout", char* message_stamp="");
--    void find_zeros_via_gram(Double t1, Long count=0,Double max_refine=1025,char* filename="cout", char* message_stamp="");
-+    void find_zeros(Double t1, Double t2, Double step_size, const char* filename="cout", const char* message_stamp="");
-+    void find_zeros_via_gram(Double t1, Long count=0,Double max_refine=1025, const char* filename="cout", const char* message_stamp="");
-     int compute_rank(bool print_rank=false);
-     void verify_rank(int rank);
--    void find_zeros_via_N(Long count=0,bool do_negative=true,Double max_refine=1025, int rank=-1,char* filename="cout", char* message_stamp="");
--    void find_zeros_elaborate(Double t1, Long count=0,Double max_refine=1025,char* filename="cout", char* message_stamp="");
-+    void find_zeros_via_N(Long count=0,bool do_negative=true,Double max_refine=1025, int rank=-1,const char* filename="cout", const char* message_stamp="");
-+    void find_zeros_elaborate(Double t1, Long count=0,Double max_refine=1025, const char* filename="cout", const char* message_stamp="");
- 
- 
- };
-diff -ur lcalc-0.0.20080205/include/Lriemannsiegel.h tmp/lcalc-0.0.20080205/include/Lriemannsiegel.h
---- lcalc-0.0.20080205/include/Lriemannsiegel.h	2005-06-12 16:34:19.000000000 -0400
-+++ tmp/lcalc-0.0.20080205/include/Lriemannsiegel.h	2008-04-13 22:25:19.000000000 -0400
-@@ -30,7 +30,7 @@
- #include "Lgamma.h"           //for global variables
- #include "Lmisc.h"           //for global variables
- 
--Complex Zeta(Complex s,char *return_type="pure");
-+Complex Zeta(Complex s, const char *return_type="pure");
- Double C(int i, Double p);
- Complex siegel(Complex s, int N=10);
- 
-diff -ur lcalc-0.0.20080205/include/Lvalue.h tmp/lcalc-0.0.20080205/include/Lvalue.h
---- lcalc-0.0.20080205/include/Lvalue.h	2008-02-04 02:10:39.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/include/Lvalue.h	2008-04-13 22:25:19.000000000 -0400
-@@ -62,7 +62,7 @@
- 
-     template <class ttype>
-     Complex L_function <ttype>::
--    value_via_Riemann_sum(Complex s,char *return_type)
-+    value_via_Riemann_sum(Complex s, const char *return_type)
-     {
-         int j,k,m,n;
-         Complex r,z;
-@@ -479,7 +479,7 @@
-     // we are willing to sacrifice for the sake of
-     template <class ttype>
-     Complex L_function <ttype>::
--    value_via_gamma_sum(Complex s, char *return_type)
-+    value_via_gamma_sum(Complex s, const char *return_type)
-     {
-         Complex L_value=0;
-         Double theta=gamma[1];  // equals gamma_1
-@@ -558,7 +558,7 @@
- 
-     template <class ttype>
-     Complex L_function <ttype>::
--    value(Complex s, int derivative, char *return_type)
-+    value(Complex s, int derivative, const char *return_type)
-     {
-       Complex L_value;
- 
-diff -ur lcalc-0.0.20080205/src/cmdline.c tmp/lcalc-0.0.20080205/src/cmdline.c
---- lcalc-0.0.20080205/src/cmdline.c	2008-02-05 17:23:23.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/src/cmdline.c	2008-04-13 22:25:19.000000000 -0400
-@@ -30,7 +30,7 @@
- cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required, const char *additional_error);
+--- a/src/cmdline.c
++++ b/src/cmdline.c
+@@ -93,7 +93,7 @@
+                         struct cmdline_parser_params *params, const char *additional_error);
  
  
 -char *cmdline_parser_output_character_values[] = {"1", "2", 0} ;	/* Possible values for output-character.  */
@@ -235,100 +20,12 @@ diff -ur lcalc-0.0.20080205/src/cmdline.c tmp/lcalc-0.0.20080205/src/cmdline.c
  
  static char *
  gengetopt_strdup (const char *s);
-@@ -704,7 +704,7 @@
- }
- 
+@@ -410,7 +410,7 @@
+  * -2 if more than one value has matched
+  */
  static int
 -check_possible_values(const char *val, char *values[])
 +check_possible_values(const char *val, const char *values[])
  {
-   int i, found;
+   int i, found, last;
    size_t len;
-diff -ur lcalc-0.0.20080205/src/Lcommandline_numbertheory.cc tmp/lcalc-0.0.20080205/src/Lcommandline_numbertheory.cc
---- lcalc-0.0.20080205/src/Lcommandline_numbertheory.cc	2008-02-04 00:36:36.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/src/Lcommandline_numbertheory.cc	2008-04-13 22:25:25.000000000 -0400
-@@ -649,8 +649,8 @@
- 
-     }while(!is_primitive&&a<p-1);
- 
--    for(k=0;k<=29;k++) delete(factors[k]);
--    delete (factors);
-+    for(k=0;k<=29;k++) delete[](factors[k]);
-+    delete[] (factors);
- 
-     if(alpha==1) return a;
- 
-diff -ur lcalc-0.0.20080205/src/Lcommandline_twist.cc tmp/lcalc-0.0.20080205/src/Lcommandline_twist.cc
---- lcalc-0.0.20080205/src/Lcommandline_twist.cc	2008-02-04 01:14:15.000000000 -0500
-+++ tmp/lcalc-0.0.20080205/src/Lcommandline_twist.cc	2008-04-13 22:25:25.000000000 -0400
-@@ -116,7 +116,7 @@
- //the first count zeros above x.
- 
- 
--int quadratic_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size,char *what_to_do,bool do_only_even_twists,int desired_rank)
-+int quadratic_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size,const char *what_to_do,bool do_only_even_twists,int desired_rank)
- {
- 
-     int k,n;
-@@ -551,7 +551,7 @@
- 
- //twist_type: -1 just one complex primitive twist, -2 all non-real primitive twists, 0 all primitive twists, 1 all twists with
- //conjugate pairs only appearing once, 2 all twists with conjugate pairs appearing twice
--int all_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size,char *what_to_do,int twist_type,int print_character)
-+int all_twists(Long D1, Long D2,Double x,Double y,int count,Double step_size,const char *what_to_do,int twist_type,int print_character)
- {
- 
-     //variables for twisting
-@@ -603,7 +603,7 @@
-     Complex s;
- 
-     Long d;
--    char *tmp_name="L_chi";
-+    const char *tmp_name="L_chi";
- 
-     i=0;
- 
-@@ -759,7 +759,7 @@
- 
- 
-         r=d; // a bit redundant since we are using q,r,d for the 
--             // same value. But this allows me to mouse quadratic_twists
-+             // same value. But this allows me to mouse Quadratic_twists
- 
- 
- // xxxxxxxxxxxx trivial character do not compute...
-@@ -1174,8 +1174,8 @@
- 
- 
-     } // for d
--    for(k=0;k<=29;k++) delete(factors[k]);
--    delete (factors);
-+    for(k=0;k<=29;k++) delete[](factors[k]);
-+    delete [] (factors);
-     delete [] tmp_g;
-     delete [] tmp_l;
-     delete [] tmp_cmplx;
-diff -ur lcalc-0.0.20080205/src/Lcommandline_values_zeros.cc tmp/lcalc-0.0.20080205/src/Lcommandline_values_zeros.cc
---- lcalc-0.0.20080205/src/Lcommandline_values_zeros.cc	2007-10-29 02:16:35.000000000 -0400
-+++ tmp/lcalc-0.0.20080205/src/Lcommandline_values_zeros.cc	2008-04-13 22:25:19.000000000 -0400
-@@ -26,7 +26,7 @@
- 
- 
- //-----functions--------------------------------------------------------------
--void compute_values(Double x,Double y,char *file_name,Double x3,Double y3,Long count)
-+void compute_values(Double x,Double y,const char *file_name,Double x3,Double y3,Long count)
- {
- 
-     fstream file;
-diff -ur lcalc-0.0.20080205/src/Lriemannsiegel.cc tmp/lcalc-0.0.20080205/src/Lriemannsiegel.cc
---- lcalc-0.0.20080205/src/Lriemannsiegel.cc	2007-10-05 19:12:52.000000000 -0400
-+++ tmp/lcalc-0.0.20080205/src/Lriemannsiegel.cc	2008-04-13 22:25:19.000000000 -0400
-@@ -28,7 +28,7 @@
- //To do: Odlyzko Schonhage algorithm XXX
- 
- // ZETA FUNCTION
--Complex Zeta(Complex s,char *return_type) {
-+Complex Zeta(Complex s, const char *return_type) {
- 
-   Complex L_value;
- 
diff --git a/debian/patches/pari_2.5.patch b/debian/patches/pari_2.5.patch
index 450b0f2..093e1fe 100644
--- a/debian/patches/pari_2.5.patch
+++ b/debian/patches/pari_2.5.patch
@@ -1,8 +1,6 @@
-Index: lcalc-0.0.20080205/src/Lcommandline.cc
-===================================================================
---- lcalc-0.0.20080205.orig/src/Lcommandline.cc	2011-08-14 15:38:30.412776773 +0200
-+++ lcalc-0.0.20080205/src/Lcommandline.cc	2011-08-14 15:38:27.912776697 +0200
-@@ -422,7 +422,7 @@
+--- a/src/Lcommandline.cc
++++ b/src/Lcommandline.cc
+@@ -473,7 +473,7 @@
  
  #ifdef INCLUDE_PARI
          if(do_elliptic_curve){
@@ -11,10 +9,8 @@ Index: lcalc-0.0.20080205/src/Lcommandline.cc
               if (my_verbose>0) cout << "Will precompute " << N_terms << " elliptic L-function dirichlet coefficients..." << endl;
               initialize_new_L(a1,a2,a3,a4,a6,N_terms); 
          }
-Index: lcalc-0.0.20080205/src/Lcommandline_elliptic.cc
-===================================================================
---- lcalc-0.0.20080205.orig/src/Lcommandline_elliptic.cc	2011-08-14 15:38:30.352776771 +0200
-+++ lcalc-0.0.20080205/src/Lcommandline_elliptic.cc	2011-08-14 15:38:27.912776697 +0200
+--- a/src/Lcommandline_elliptic.cc
++++ b/src/Lcommandline_elliptic.cc
 @@ -121,11 +121,11 @@
  
  

-- 
lcalc: program for computing zeros and values of L-functions



More information about the debian-science-commits mailing list