]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
regress: save arrays of constants in single-precision
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 4 Aug 2016 11:59:42 +0000 (13:59 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 11 Aug 2016 08:45:48 +0000 (10:45 +0200)
No need to waste space on double precision. Also, declare them as const.

regress.c

index 71845d514cb24c9e75db2d3d5dd53818f6ef26d2..f95d53b2920f5fd9986dede47bfb8e58d06c26d7 100644 (file)
--- a/regress.c
+++ b/regress.c
@@ -109,7 +109,7 @@ double
 RGR_GetTCoef(int dof)
 {
   /* Assuming now the 99.95% quantile */
-  static double coefs[] =
+  static const float coefs[] =
   { 636.6, 31.6, 12.92, 8.61, 6.869,
     5.959, 5.408, 5.041, 4.781, 4.587,
     4.437, 4.318, 4.221, 4.140, 4.073,
@@ -132,7 +132,7 @@ RGR_GetTCoef(int dof)
 double
 RGR_GetChi2Coef(int dof)
 {
-  static double coefs[] = {
+  static const float coefs[] = {
     2.706, 4.605, 6.251, 7.779, 9.236, 10.645, 12.017, 13.362,
     14.684, 15.987, 17.275, 18.549, 19.812, 21.064, 22.307, 23.542,
     24.769, 25.989, 27.204, 28.412, 29.615, 30.813, 32.007, 33.196,