/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include <float.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_matrix.h>
#include <math.h>
ds_destroy (&vstr);
- tab_text_format (t, count + 2, c_num + 2, TAB_RIGHT, "%g", coeffn->coeff);
+ tab_text_format (t, count + 2, c_num + 2, TAB_RIGHT, "%.*g",
+ DBL_DIG + 1, coeffn->coeff);
}
++c_num;
}
TAB_RIGHT, df,
NULL);
- /* The Significance */
- tab_double (t, 7, (v * lines_per_variable) + i + 1 + n_contrasts,
- TAB_RIGHT, 2 * gsl_cdf_tdist_Q (T,df),
- NULL);
+ {
+ double p = gsl_cdf_tdist_P (T, df);
+ double q = gsl_cdf_tdist_Q (T, df);
+
+ /* The Significance */
+ tab_double (t, 7, (v * lines_per_variable) + i + 1 + n_contrasts,
+ TAB_RIGHT, 2 * ((T > 0) ? q : p),
+ NULL);
+ }
}
if ( v > 0 )