input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
void plain_print_act_pred(const int *ap, PRN *prn) {
char *v2;
int v3;
char *v4;
char *v5;
int numwidth;
int i;
int bign;
int leftlen;
numwidth = 1;
bign = 0;
for (i = 0; i <= 3; ++i) {
if (bign < ap[i])
bign = ap[i];
}
while (1) {
bign /= 10;
if (!bign)
break;
++n... | static void plain_print_act_pred(const int *ap, PRN *prn) {
int leftlen;
int numwidth = 1;
int i, bign = 0;
for (i = 0; i < 4; i++) {
if (ap[i] > bign) {
bign = ap[i];
}
}
while (bign /= 10) {
numwidth++;
}
leftlen = char_len(_("Actual")) + 3;
bufspace(leftlen + 2, prn);
pputs(... | plain_print_act_pred | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plain_print_aux_coeffs(const double *b, const double *se,
const char **names, int nc, int df_0, int ci,
PRN *prn) {
double v8;
int v9;
char *v10;
int colsep;
int namelen;
int d;
int i;
int j;
int err;
int hlen;
int n;
double tval;
doubl... | static int plain_print_aux_coeffs(const double *b, const double *se,
const char **names, int nc, int df, int ci,
PRN *prn) {
struct printval **vals, *vij;
const char *headings[] = {N_("coefficient"), N_("std. error"), N_("t-ratio"),
... | plain_print_aux_coeffs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plain_print_coefficients(const MODEL *pmod, const DATASET *dset, PRN *prn) {
if (!pmod->ncoeff)
return 0;
if (gretl_model_get_data(pmod, "rq_sequence"))
return print_rq_sequence(pmod, dset, prn);
if (pmod->ci == 83)
return plain_print_mp_coeffs(pmod, dset, prn);
return plain_print_coeffs(pmod, d... | static int plain_print_coefficients(const MODEL *pmod, const DATASET *dset,
PRN *prn) {
if (pmod->ncoeff == 0) {
return 0;
} else if (gretl_model_get_data(pmod, "rq_sequence") != NULL) {
return print_rq_sequence(pmod, dset, prn);
} else if (pmod->ci == MPOLS) {
retu... | plain_print_coefficients | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plain_print_coeffs(const MODEL *pmod, const DATASET *dset, PRN *prn) {
int v4;
_BOOL4 v5;
double v6;
double v7;
int v8;
printval *v9;
printval *v10;
const char *depvar_name;
int v12;
int v13;
int seppos;
int colsep;
int k;
int cblock;
int d;
int nc;
int adfnum;
int intervals;
i... | static int plain_print_coeffs(const MODEL *pmod, const DATASET *dset,
PRN *prn) {
struct printval **vals, *vij;
const char *headings[] = {N_("coefficient"), N_("std. error"), N_("t-ratio"),
N_("p-value"), N_("slope"), N_("lower"),
... | plain_print_coeffs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plain_print_double(char *s, int d, double x, PRN *prn) {
char tmp[40];
unsigned long v5;
v5 = __readfsqword(0x28u);
if (fabs(x) <= 1.797693134862316e308) {
if (x < 0.0 && gretl_print_has_minus(prn)) {
*s = 0;
*(_DWORD *)&s[strlen(s)] = 9603298;
sprintf(tmp, "%.*g", d,
C... | static void plain_print_double(char *s, int d, double x, PRN *prn) {
if (na(x)) {
strcpy(s, "NA");
} else if (x < 0 && gretl_print_has_minus(prn)) {
char tmp[32];
*s = '\0';
strcat(s, "−");
sprintf(tmp, "%.*g", d, -x);
strcat(s, tmp);
} else {
sprintf(s, "%.*g", d, x);
}
} | plain_print_double | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plain_print_mp_coeffs(const MODEL *pmod, const DATASET *dset, PRN *prn) {
double v4;
int v5;
char *v6;
int colsep;
int namelen;
int i;
int j;
int err;
int nc;
int minus;
int hlen;
int n;
const double *b;
const double *se;
char **names;
printval **vals;
const char *head;
int lmax[... | static int plain_print_mp_coeffs(const MODEL *pmod, const DATASET *dset,
PRN *prn) {
struct printval **vals;
const char *headings[] = {N_("coefficient"), N_("std. error")};
const double *b = pmod->coeff;
const double *se = pmod->sderr;
char **names = NULL;
const char *head;
... | plain_print_mp_coeffs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plain_print_package_info(const fnpkg *pkg, const char *fname, PRN *prn) {
const char *v3;
char *v4;
char *v5;
const char *v6;
int i;
char vstr[8];
unsigned long v10;
v10 = __readfsqword(0x28u);
if ((unsigned int)g_path_is_absolute(fname) && !strstr(fname, "dltmp."))
pprintf(prn, "File: %s\n"... | static void plain_print_package_info(const fnpkg *pkg, const char *fname,
PRN *prn) {
char vstr[8];
int i;
if (g_path_is_absolute(fname) && !strstr(fname, "dltmp.")) {
pprintf(prn, "File: %s\n", fname);
}
if (pkg->name[0] == '\0' || pkg->author == NULL || pkg->minver ... | plain_print_package_info | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plain_print_sy_vals(gretl_matrix *v, double g, int k, gretlopt opt,
PRN *prn) {
char *v5;
char *v6;
char *v7;
char *v8;
char *v9;
short opta;
int i;
int ia;
int gpos;
int gposa;
double x;
double xa;
opta = opt;
gpos = -1;
pputs(prn, " ");
if (k == 1) {
... | static void plain_print_sy_vals(gretl_matrix *v, double g, int k, gretlopt opt,
PRN *prn) {
int i, gpos = -1;
double x;
pputs(prn, " ");
if (k == 1) {
pputs(prn, _("Critical values for TSLS bias relative to OLS:\n"));
} else if (opt & OPT_L) {
pputs(prn, _("Critical... | plain_print_sy_vals | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plain_steps_spec(gretlopt opt) {
return (opt & 0x10000) != 0 && (opt & 0xD002) == 0 &&
get_optval_string(plot_ci, OPT_Q) == 0;
} | static int plain_steps_spec(gretlopt opt) {
if ((opt & OPT_Q) && !(opt & (OPT_O | OPT_M | OPT_B | OPT_P))) {
return get_optval_string(plot_ci, OPT_Q) == NULL;
} else {
return 0;
}
} | plain_steps_spec | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plausible_genr_start(const char *s, const DATASET *dset) {
const char *sa;
int ret;
char fmt[32];
char word[40];
unsigned long v7;
v7 = __readfsqword(0x28u);
ret = 0;
if (!strchr(s, 61) && !strstr(s, "++") && !strstr(s, "--"))
return gretl_type_from_name(s, dset) != GRETL_TYPE_NONE;
memset(wo... | int plausible_genr_start(const char *s, const DATASET *dset) {
int ret = 0;
if (strchr(s, '=') || strstr(s, "++") || strstr(s, "--")) {
const char *ok = ".+-*/%^~|=[";
char word[VNAMELEN] = {0};
char fmt[20];
sprintf(fmt, "%%%d[^[ .+*/%%^~|=-]", VNAMELEN - 1);
if (sscanf(s, fmt, word)) {
... | plausible_genr_start | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plausible_panel_time_var(const DATASET *dset) {
int i;
int t;
int ret;
int ok;
const double *x;
ret = 0;
for (i = 1; i < dset->v && !ret; ++i) {
if (may_be_time_name(dset->varname[i])) {
x = dset->Z[i];
ok = 1;
for (t = 0; t < dset->n && ok; ++t) {
if (fabs(x[t]) <= 1.79... | int plausible_panel_time_var(const DATASET *dset) {
int i, t, ret = 0;
for (i = 1; i < dset->v && ret == 0; i++) {
if (may_be_time_name(dset->varname[i])) {
const double *x = dset->Z[i];
int val0 = x[0];
int incr0 = x[1] - x[0];
int ok = 1;
for (t = 0; t < dset->n && ok; t++) {
... | plausible_panel_time_var | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_append_strings(char ***pS, int *pns, const char *s) {
int ns;
int err;
gretl_array *A;
char **S;
unsigned long v8;
v8 = __readfsqword(0x28u);
A = get_array_by_name(s);
ns = 0;
err = 0;
if (!A)
return 2;
if (gretl_array_get_type(A) != GRETL_TYPE_STRINGS)
return 37;
S = gretl_arr... | static int plot_append_strings(char ***pS, int *pns, const char *s) {
gretl_array *A = get_array_by_name(s);
int ns = 0, err = 0;
if (A == NULL) {
err = E_DATA;
} else if (gretl_array_get_type(A) != GRETL_TYPE_STRINGS) {
err = E_TYPES;
} else {
char **S = gretl_array_get_strings(A, &ns);
if ... | plot_append_strings | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plot_colname(char *s, const char **colnames, int j) {
const char *name;
if (colnames) {
name = colnames[j - 1];
*s = 0;
if (strlen(name) <= 0xF) {
strncat(s, name, 0xFu);
} else {
strncat(s, name, 0xEu);
*(_WORD *)&s[strlen(s)] = 126;
}
} else {
sprintf(s, "col %d",... | static void plot_colname(char *s, const char **colnames, int j) {
if (colnames != NULL) {
const char *name = colnames[j - 1];
*s = '\0';
if (strlen(name) >= 16) {
strncat(s, name, 14);
strcat(s, "~");
} else {
strncat(s, name, 15);
}
} else {
sprintf(s, "col %d", j);
}
} | plot_colname | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_corrmat(VMatrix *corr, gretlopt opt) {
char *v3;
int err;
int i;
int j;
int allpos;
int n;
int df_0;
int idx;
double rcrit;
FILE *fp;
double tc;
double t2;
unsigned long v15;
v15 = __readfsqword(0x28u);
rcrit = 0.0;
allpos = 1;
err = 0;
fp = open_plot_input_file(PLOT_HEATMA... | int plot_corrmat(VMatrix *corr, gretlopt opt) {
FILE *fp;
double rcrit = 0.0;
int i, j, df, n, idx;
int allpos = 1;
int err = 0;
fp = open_plot_input_file(PLOT_HEATMAP, 0, &err);
if (err) {
return err;
}
n = corr->dim;
for (i = 0; i < n; i++) {
for (j = i + 1; j < n; j++) {
idx = ij... | plot_corrmat | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_fcast_errs(const FITRESID *fr, const double *maxerr,
const DATASET *dset, gretlopt opt) {
int t0;
int v5;
int v6;
double v8;
char *v9;
char *v10;
char *v11;
short opta;
int err;
int depvar_present;
int use_fill;
int use_lines;
int t2;
int t1;
int yhmin;
int t... | int plot_fcast_errs(const FITRESID *fr, const double *maxerr,
const DATASET *dset, gretlopt opt) {
FILE *fp = NULL;
const double *obs = NULL;
GptFlags flags = 0;
double xmin, xmax, xrange;
int depvar_present = 0;
int use_fill = 0, use_lines = 0;
int do_errs = (maxerr != NULL);
gchar ... | plot_fcast_errs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_freq(FreqDist *freq, DistCode dist, gretlopt opt) {
char *v4;
char *v5;
double v6;
char *v7;
double v8;
char *v9;
char *v10;
char *v11;
int ns;
int real_ns;
int err;
int i;
int plottype;
int use_boxes;
int K;
int nlit;
double alpha;
double beta;
double lambda;
double plo... | int plot_freq(FreqDist *freq, DistCode dist, gretlopt opt) {
double alpha = 0.0, beta = 0.0, lambda = 1.0;
FILE *fp = NULL;
int i, K = freq->numbins;
char withstr[32] = {0};
gchar *label = NULL;
double plotmin = 0.0, plotmax = 0.0;
double barwidth;
const double *endpt;
int plottype, use_boxes = 1;
c... | plot_freq | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plot_get_scaled_dimensions(int *width, int *height, double scale) {
*width = (int)((double)*width * scale);
*height = (int)((double)*height * scale);
if ((*width & 1) != 0)
++*width;
if ((*height & 1) != 0)
++*height;
} | void plot_get_scaled_dimensions(int *width, int *height, double scale) {
*width *= scale;
*height *= scale;
if (*width % 2)
*width += 1;
if (*height % 2)
*height += 1;
} | plot_get_scaled_dimensions | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const char *plot_output_option(PlotType p, int *pci) {
const char *optval_string;
int ci;
const char *s;
ci = plot_ci;
if (p == PLOT_MULTI_SCATTER) {
ci = 114;
optval_string = get_optval_string(114, OPT_U);
} else if (p == PLOT_BOXPLOTS) {
ci = 13;
optval_string = get_optval_string(13, OPT_... | static const char *plot_output_option(PlotType p, int *pci) {
int ci = plot_ci;
const char *s;
if (p == PLOT_MULTI_SCATTER) {
ci = SCATTERS;
} else if (p == PLOT_BOXPLOTS) {
ci = BXPLOT;
} else if (p == PLOT_FORECAST) {
ci = FCAST;
} else if (p == PLOT_CORRELOGRAM) {
ci = CORRGM;
} else i... | plot_output_option | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_printf(const char *s, const DATASET *dset) {
int err;
char *genline;
char *genout;
unsigned long v6;
v6 = __readfsqword(0x28u);
err = 0;
genline = (char *)g_strdup_printf("sprintf(%s)", s);
gretl_push_c_numeric_locale();
genout = generate_string(genline, (DATASET *)dset, &err);
gretl_pop_c... | static int plot_printf(const char *s, const DATASET *dset) {
char *genline;
char *genout;
int err = 0;
genline = g_strdup_printf("sprintf(%s)", s);
gretl_push_c_numeric_locale();
genout = generate_string(genline, (DATASET *)dset, &err);
gretl_pop_c_numeric_locale();
if (err) {
fprintf(stderr, "plo... | plot_printf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_simple_fcast_bands(const MODEL *pmod, const FITRESID *fr,
const DATASET *dset, gretlopt opt) {
int t0;
char *v6;
short opta;
int t2;
int err;
int t;
GptFlags flags;
int xv;
int t1;
int yhmin;
int n;
double xmin;
double xmax;
gchar *cistr;
FILE *fp;
co... | int plot_simple_fcast_bands(const MODEL *pmod, const FITRESID *fr,
const DATASET *dset, gretlopt opt) {
FILE *fp = NULL;
const double *x = NULL;
int *order = NULL;
GptFlags flags = 0;
double a, xmin, xmax, xrange, tval;
int xv = pmod->list[3];
gchar *cistr;
int t2 = fr->t2;
... | plot_simple_fcast_bands | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_tau_sequence(const MODEL *pmod, const DATASET *dset, int k) {
int rows;
int cols;
double v6;
double v7;
double v8;
double v9;
const char *graph_name;
char *v11;
char *v12;
char *v13;
int err;
int i;
int j;
int ntau;
int bcols;
double blo;
double bhi;
double alpha;
gretl_ma... | int plot_tau_sequence(const MODEL *pmod, const DATASET *dset, int k) {
FILE *fp;
gretl_matrix *tau = gretl_model_get_data(pmod, "rq_tauvec");
gretl_matrix *B = gretl_model_get_data(pmod, "rq_sequence");
double tau_i, bi, se, blo, bhi;
double alpha, cval, tcrit, olsband;
double ymin[2], ymax[2];
gchar *tmp... | plot_tau_sequence | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
PlotType plot_type_from_string(const char *str) {
int i;
PlotType ret;
int len;
ret = PLOT_REGULAR;
for (i = 1; ptinfo[i].pstr; ++i) {
len = strlen(ptinfo[i].pstr);
if (!strncmp(str + 2, ptinfo[i].pstr, len))
return ptinfo[i].ptype;
}
return ret;
} | PlotType plot_type_from_string(const char *str) {
int i, len, ret = PLOT_REGULAR;
for (i = 1; ptinfo[i].pstr != NULL; i++) {
len = strlen(ptinfo[i].pstr);
if (!strncmp(str + 2, ptinfo[i].pstr, len)) {
ret = ptinfo[i].ptype;
break;
}
}
return ret;
} | plot_type_from_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plot_with_band(int mode, gnuplot_info *gi, const char *literal,
DATASET *dset, gretlopt opt) {
GptFlags flags;
const char *graph_name;
const char *v8;
char *v9;
const char *v10;
char *v11;
int style;
int err;
int oddman;
int show_zero;
int t1;
int t2;
int i;
int n_yvar... | static int plot_with_band(int mode, gnuplot_info *gi, const char *literal,
DATASET *dset, gretlopt opt) {
struct band_pm pm = {-1, -1, 1.0, 0};
FILE *fp = NULL;
const double *x = NULL;
const double *y = NULL;
const double *c = NULL;
const double *w = NULL;
const double *d = NULL;... | plot_with_band | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotbars_free(plotbars *bars) {
if (bars) {
doubles_array_free(bars->dx, bars->n);
free(bars);
}
} | static void plotbars_free(plotbars *bars) {
if (bars != NULL) {
doubles_array_free(bars->dx, bars->n);
free(bars);
}
} | plotbars_free | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
plotbars *plotbars_new(int n) {
plotbars *bars;
bars = (plotbars *)malloc(0x30u);
if (bars) {
bars->dx = doubles_array_new(n, 2);
if (bars->dx) {
bars->n = n;
bars->t2 = 0.0;
bars->t1 = bars->t2;
bars->ymax = 0.0;
bars->ymin = bars->ymax;
} else {
free(bars);
... | static plotbars *plotbars_new(int n) {
plotbars *bars = malloc(sizeof *bars);
if (bars != NULL) {
bars->dx = doubles_array_new(n, 2);
if (bars->dx == NULL) {
free(bars);
bars = NULL;
} else {
bars->n = n;
bars->t1 = bars->t2 = 0;
bars->ymin = bars->ymax = 0;
}
}
r... | plotbars_new | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotgroup_destroy(PLOTGROUP *grp) {
int i;
if (grp) {
for (i = 0; i < grp->nplots; ++i) {
gretl_matrix_free(grp->plots[i].outliers);
free(grp->plots[i].bool);
}
free(grp->title);
free(grp->x);
free(grp->plots);
gretl_matrix_free(grp->dvals);
free(grp);
}
} | static void plotgroup_destroy(PLOTGROUP *grp) {
int i;
if (grp == NULL) {
return;
}
for (i = 0; i < grp->nplots; i++) {
gretl_matrix_free(grp->plots[i].outliers);
free(grp->plots[i].bool);
}
free(grp->title);
free(grp->x);
free(grp->plots);
gretl_matrix_free(grp->dvals);
free(grp);
} | plotgroup_destroy | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotgroup_factor_setup(PLOTGROUP *grp, const DATASET *dset) {
int v2;
int rows;
int err;
int T;
int dv;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (dset)
v2 = dset->t2 - dset->t1 + 1;
else
v2 = 0;
T = v2;
dv = *((_DWORD *)grp->list + 2);
err = 0;
grp->dvals = gretl_matrix_val... | static int plotgroup_factor_setup(PLOTGROUP *grp, const DATASET *dset) {
int T = sample_size(dset);
int dv = grp->list[2];
int err = 0;
grp->dvals = gretl_matrix_values(dset->Z[dv] + dset->t1, T, OPT_S, &err);
if (!err) {
grp->nplots = gretl_vector_get_length(grp->dvals);
}
#if BDEBUG
fprintf(stderr... | plotgroup_factor_setup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
PLOTGROUP *plotgroup_new(const int *list, const char *literal,
const DATASET *dset, double limit, int pan_min,
gretlopt opt) {
const char *v7;
char *v8;
int i;
int err;
PLOTGROUP *grp;
const char *vlabel;
err = 0;
grp = (PLOTGROUP *)malloc(0x98u);
if ... | static PLOTGROUP *plotgroup_new(const int *list, const char *literal,
const DATASET *dset, double limit, int pan_min,
gretlopt opt) {
PLOTGROUP *grp;
int i, n, err = 0;
grp = malloc(sizeof *grp);
if (grp == NULL) {
return NULL;
}
grp->npl... | plotgroup_new | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotlist_is_group_invariant(const int *list, const DATASET *dset) {
int i;
for (i = 1; i <= *list; ++i) {
if (!series_is_group_invariant(dset, list[i]))
return 0;
}
return 1;
} | static int plotlist_is_group_invariant(const int *list, const DATASET *dset) {
int i;
for (i = 1; i <= list[0]; i++) {
if (!series_is_group_invariant(dset, list[i])) {
return 0;
}
}
return 1;
} | plotlist_is_group_invariant | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double plotpos(int k, int n) { return ((double)k - 0.5) / (double)n; } | static double plotpos(int k, int n) {
#if MAKKONEN_POS
return k / (n + 1.0);
#else
return (k - 0.5) / n;
#endif
} | plotpos | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_add_arrow(GPT_SPEC *spec) {
int n;
GPT_ARROW *arrows;
n = spec->n_arrows;
arrows = (GPT_ARROW *)realloc(spec->arrows, 40LL * (n + 1));
if (!arrows)
return 12;
spec->arrows = arrows;
++spec->n_arrows;
arrows[n].x0 = 0.0;
arrows[n].y0 = 0.0;
arrows[n].x1 = 0.0;
arrows[n].y1 = 0.0;
... | int plotspec_add_arrow(GPT_SPEC *spec) {
GPT_ARROW *arrows;
int n = spec->n_arrows;
arrows = realloc(spec->arrows, (n + 1) * sizeof *arrows);
if (arrows == NULL) {
return E_ALLOC;
}
spec->arrows = arrows;
spec->n_arrows += 1;
arrows[n].x0 = 0;
arrows[n].y0 = 0;
arrows[n].x1 = 0;
arrows[n].y1... | plotspec_add_arrow | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_add_bars_info(GPT_SPEC *spec, double xmin, double xmax,
double ymin, double ymax, const char *fname) {
int err;
int n;
plotbars *bars;
unsigned long v10;
v10 = __readfsqword(0x28u);
bars = 0;
err = 0;
if (spec->bars) {
plotbars_free(bars);
spec->bars = 0;... | int plotspec_add_bars_info(GPT_SPEC *spec, double xmin, double xmax,
double ymin, double ymax, const char *fname) {
plotbars *bars = NULL;
int err = 0;
if (spec->bars != NULL) {
plotbars_free(bars);
spec->bars = NULL;
spec->nbars = 0;
}
bars = parse_bars_file(fname, &... | plotspec_add_bars_info | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_add_fit(GPT_SPEC *spec, FitType f) {
double *v3;
char *v4;
double *v5;
int err;
int i;
int t;
int k;
int T;
int d;
double s2;
gretl_matrix *b;
gretl_matrix *yh;
double x0;
double xt;
gretl_matrix *y;
gretl_matrix *X;
const double *px;
double q;
const double *py;
unsi... | int plotspec_add_fit(GPT_SPEC *spec, FitType f) {
gretl_matrix *y = NULL;
gretl_matrix *X = NULL;
gretl_matrix *b = NULL;
gretl_matrix *yh = NULL;
const double *px = spec->data->val;
const double *py;
int T = spec->okobs;
double x0 = NADBL;
double xt, q = 0.5;
int d = 1;
int i, t, k;
int err = 0... | plotspec_add_fit | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_add_label(GPT_SPEC *spec) {
int n;
GPT_LABEL *labels;
n = spec->n_labels;
labels = (GPT_LABEL *)realloc(spec->labels, 56LL * (n + 1));
if (!labels)
return 12;
spec->labels = labels;
++spec->n_labels;
labels[n].text[0] = 0;
labels[n].pos[0] = NAN;
labels[n].pos[1] = NAN;
labels[n]... | int plotspec_add_label(GPT_SPEC *spec) {
GPT_LABEL *labels;
int n = spec->n_labels;
labels = realloc(spec->labels, (n + 1) * sizeof *labels);
if (labels == NULL) {
return E_ALLOC;
}
spec->labels = labels;
spec->n_labels += 1;
labels[n].text[0] = '\0';
labels[n].pos[0] = NADBL;
labels[n].pos[1... | plotspec_add_label | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_add_line(GPT_SPEC *spec) {
int n;
GPT_LINE *lines;
n = spec->n_lines;
lines = (GPT_LINE *)realloc(spec->lines, 88LL * (n + 1));
if (!lines)
return 12;
spec->lines = lines;
++spec->n_lines;
lines[n].varnum = 0;
lines[n].style = GP_STYLE_NONE;
lines[n].pscale = 1.0;
lines[n].rgb[0]... | int plotspec_add_line(GPT_SPEC *spec) {
GPT_LINE *lines;
int n = spec->n_lines;
lines = realloc(spec->lines, (n + 1) * sizeof *lines);
if (lines == NULL) {
return E_ALLOC;
}
spec->lines = lines;
spec->n_lines += 1;
lines[n].varnum = 0;
lines[n].style = 0;
lines[n].pscale = 1.0;
lines[n].rgb... | plotspec_add_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_allocate_bars(GPT_SPEC *spec) {
int err;
err = 0;
spec->bars = plotbars_new(spec->nbars);
if (!spec->bars)
return 12;
return err;
} | int plotspec_allocate_bars(GPT_SPEC *spec) {
int err = 0;
spec->bars = plotbars_new(spec->nbars);
if (spec->bars == NULL) {
err = E_ALLOC;
}
return err;
} | plotspec_allocate_bars | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GPT_ARROW *plotspec_clone_arrows(GPT_SPEC *spec, int *err) {
int i;
GPT_ARROW *arrows;
if (!spec->n_arrows)
return 0;
arrows = (GPT_ARROW *)malloc(40LL * spec->n_arrows);
if (arrows) {
for (i = 0; i < spec->n_arrows; ++i)
copy_arrow_content(&arrows[i], &spec->arrows[i]);
} else {
*err = 1... | GPT_ARROW *plotspec_clone_arrows(GPT_SPEC *spec, int *err) {
GPT_ARROW *arrows = NULL;
int i;
if (spec->n_arrows == 0) {
return NULL;
}
arrows = malloc(spec->n_arrows * sizeof *arrows);
if (arrows == NULL) {
*err = E_ALLOC;
} else {
for (i = 0; i < spec->n_arrows; i++) {
copy_arrow_co... | plotspec_clone_arrows | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GPT_LABEL *plotspec_clone_labels(GPT_SPEC *spec, int *err) {
int i;
GPT_LABEL *labels;
if (!spec->n_labels)
return 0;
labels = (GPT_LABEL *)malloc(56LL * spec->n_labels);
if (labels) {
for (i = 0; i < spec->n_labels; ++i)
copy_label_content(&labels[i], &spec->labels[i]);
} else {
*err = 1... | GPT_LABEL *plotspec_clone_labels(GPT_SPEC *spec, int *err) {
GPT_LABEL *labels = NULL;
int i;
if (spec->n_labels == 0) {
return NULL;
}
labels = malloc(spec->n_labels * sizeof *labels);
if (labels == NULL) {
*err = E_ALLOC;
} else {
for (i = 0; i < spec->n_labels; i++) {
copy_label_co... | plotspec_clone_labels | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GPT_LINE *plotspec_clone_lines(GPT_SPEC *spec, int *err) {
int i;
GPT_LINE *lines;
if (!spec->n_lines)
return 0;
lines = (GPT_LINE *)calloc(spec->n_lines, 0x58u);
if (lines) {
for (i = 0; i < spec->n_lines; ++i) {
lines[i].ustr = 0;
lines[i].mcols = 0;
copy_line_content(&lines[i], &... | GPT_LINE *plotspec_clone_lines(GPT_SPEC *spec, int *err) {
GPT_LINE *lines = NULL;
int i;
if (spec->n_lines == 0) {
return NULL;
}
lines = calloc(spec->n_lines, sizeof *lines);
if (lines == NULL) {
*err = E_ALLOC;
} else {
for (i = 0; i < spec->n_lines; i++) {
lines[i].ustr = NULL;
... | plotspec_clone_lines | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_delete_arrow(GPT_SPEC *spec, int i) {
int j;
int err;
int n;
GPT_ARROW *arrows;
GPT_ARROW *arrowsa;
arrows = spec->arrows;
n = spec->n_arrows;
err = 0;
if (i < 0 || i >= n)
return 2;
for (j = i; j < n - 1; ++j)
copy_arrow_content(&arrows[j], &arrows[j + 1]);
if (--spec->n_arr... | int plotspec_delete_arrow(GPT_SPEC *spec, int i) {
GPT_ARROW *arrows = spec->arrows;
int j, n = spec->n_arrows;
int err = 0;
if (i < 0 || i >= n) {
return E_DATA;
}
for (j = i; j < n - 1; j++) {
copy_arrow_content(&arrows[j], &arrows[j + 1]);
}
spec->n_arrows -= 1;
if (spec->n_arrows == 0)... | plotspec_delete_arrow | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_delete_label(GPT_SPEC *spec, int i) {
int j;
int err;
int n;
GPT_LABEL *labels;
GPT_LABEL *labelsa;
labels = spec->labels;
n = spec->n_labels;
err = 0;
if (i < 0 || i >= n)
return 2;
for (j = i; j < n - 1; ++j)
copy_label_content(&labels[j], &labels[j + 1]);
if (--spec->n_lab... | int plotspec_delete_label(GPT_SPEC *spec, int i) {
GPT_LABEL *labels = spec->labels;
int j, n = spec->n_labels;
int err = 0;
if (i < 0 || i >= n) {
return E_DATA;
}
for (j = i; j < n - 1; j++) {
copy_label_content(&labels[j], &labels[j + 1]);
}
spec->n_labels -= 1;
if (spec->n_labels == 0)... | plotspec_delete_label | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_delete_line(GPT_SPEC *spec, int i) {
int j;
int n;
GPT_LINE *lines;
GPT_LINE *linesa;
lines = spec->lines;
n = spec->n_lines;
if (i < 0 || i >= n)
return 2;
g_free(lines[i].title);
g_free(lines[i].formula);
free(lines[i].ustr);
free(lines[i].mcols);
for (j = i; j < n - 1; ++j)
... | int plotspec_delete_line(GPT_SPEC *spec, int i) {
GPT_LINE *lines = spec->lines;
int j, n = spec->n_lines;
if (i < 0 || i >= n) {
return E_DATA;
}
g_free(lines[i].title);
g_free(lines[i].formula);
free(lines[i].ustr);
free(lines[i].mcols);
for (j = i; j < n - 1; j++) {
copy_line_content(&li... | plotspec_delete_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_destroy(GPT_SPEC *spec) {
if (spec) {
if (spec->lines)
free_plotspec_lines(spec);
if (spec->labels)
free(spec->labels);
if (spec->arrows)
free(spec->arrows);
if (spec->data)
gretl_matrix_free(spec->data);
if (spec->auxdata)
gretl_matrix_free(spec->auxdat... | void plotspec_destroy(GPT_SPEC *spec) {
if (spec == NULL) {
return;
}
if (spec->lines != NULL) {
free_plotspec_lines(spec);
}
if (spec->labels != NULL) {
free(spec->labels);
}
if (spec->arrows != NULL) {
free(spec->arrows);
}
if (spec->data != NULL) {
gretl_matrix_free(spec->da... | plotspec_destroy | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_get_xt1_xt2(const GPT_SPEC *spec, double *xt1, double *xt2) {
if (spec->data) {
*xt1 = *spec->data->val;
*xt2 = spec->data->val[spec->nobs - 1];
}
} | static void plotspec_get_xt1_xt2(const GPT_SPEC *spec, double *xt1,
double *xt2) {
if (spec->data != NULL) {
*xt1 = spec->data->val[0];
*xt2 = spec->data->val[spec->nobs - 1];
}
} | plotspec_get_xt1_xt2 | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_line_is_formula(const GPT_SPEC *spec, int i) {
int ret;
GPT_LINE *line;
ret = 0;
if (i >= 0 && i < spec->n_lines) {
line = &spec->lines[i];
if (string_is_blank(line->formula)) {
if ((line->flags & 1) != 0) {
return 1;
} else if (i == 1) {
return (spec->flags & 0... | int plotspec_line_is_formula(const GPT_SPEC *spec, int i) {
int ret = 0;
if (i >= 0 && i < spec->n_lines) {
GPT_LINE *line = &spec->lines[i];
if (!string_is_blank(line->formula)) {
ret = 1;
} else if (line->flags & GP_LINE_USER) {
ret = 1;
} else if (i == 1 && (spec->flags & GPT_AUTO_F... | plotspec_line_is_formula | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_max_line_width(GPT_SPEC *spec) {
int i;
int lw;
lw = 0;
for (i = 0; i < spec->n_lines; ++i) {
if (spec->lines[i].width > (float)lw)
lw = (int)spec->lines[i].width;
}
return lw;
} | int plotspec_max_line_width(GPT_SPEC *spec) {
int i, lw = 0;
for (i = 0; i < spec->n_lines; i++) {
if (spec->lines[i].width > lw) {
lw = spec->lines[i].width;
}
}
return lw;
} | plotspec_max_line_width | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GPT_SPEC *plotspec_new() {
int i;
int ia;
GPT_SPEC *spec;
spec = (GPT_SPEC *)malloc(0x4A8u);
if (!spec)
return 0;
spec->datacols = 0;
spec->heredata = 0;
spec->lines = 0;
spec->n_lines = 0;
spec->labels = 0;
spec->n_labels = 0;
spec->arrows = 0;
spec->n_arrows = 0;
spec->literal = 0;
... | GPT_SPEC *plotspec_new(void) {
GPT_SPEC *spec;
int i;
spec = malloc(sizeof *spec);
if (spec == NULL) {
return NULL;
}
spec->datacols = 0;
spec->heredata = 0;
spec->lines = NULL;
spec->n_lines = 0;
spec->labels = NULL;
spec->n_labels = 0;
spec->arrows = NULL;
spec->n_arrows = 0;
spe... | plotspec_new | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_print(GPT_SPEC *spec, FILE *fp) {
const char *v2;
int v3;
char *v4;
const char *v5;
int miss;
int skipline;
int ycol;
int any_y2;
int anydata;
int i;
int k;
int j;
int png;
int mono;
double xt1;
double xt2;
GPT_LINE *line;
char src[16];
unsigned long v21;
v21 = __re... | int plotspec_print(GPT_SPEC *spec, FILE *fp) {
int png = get_png_output(spec);
int mono = (spec->flags & GPT_MONO);
double xt1 = 0, xt2 = 0;
char src[16] = "'-'";
int skipline = -1;
int ycol, any_y2 = 0;
int anydata = 0;
int i, k, miss = 0;
if (spec->pd > 0) {
fprintf(fp, "# timeseries %d", spec-... | plotspec_print | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_print_data(GPT_SPEC *spec, int skipline, int *miss, FILE *fp) {
int started_data_lines;
int i;
int ia;
int j;
int ja;
int t;
long rows;
int ncols;
double *x[5];
unsigned long v15;
v15 = __readfsqword(0x28u);
started_data_lines = 0;
for (i = 0; i < spec->n_lines; ++i) {
ncols... | static void plotspec_print_data(GPT_SPEC *spec, int skipline, int *miss,
FILE *fp) {
double *x[5];
int started_data_lines = 0;
int i, j, t;
for (i = 0; i < spec->n_lines; i++) {
int ncols = gp_line_data_columns(spec, i);
if (ncols == 0 || i == skipline) {
continu... | plotspec_print_data | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_print_heredata(GPT_SPEC *spec, int *miss, FILE *fp) {
int i;
int ia;
int t;
int j;
long r;
gretl_matrix *m;
double mti;
if (spec->auxdata) {
r = *(_QWORD *)spec->auxdata;
fprintf(fp, "# auxdata %d %d\n", r, HIDWORD(r));
fwrite("$aux << EOA\n", 1u, 0xCu, fp);
for (i = 0; i ... | static void plotspec_print_heredata(GPT_SPEC *spec, int *miss, FILE *fp) {
gretl_matrix *m = NULL;
double mti;
int i, t;
if (spec->auxdata != NULL) {
int r = spec->auxdata->rows;
int c = spec->auxdata->cols;
int j;
fprintf(fp, "# auxdata %d %d\n", r, c);
fputs("$aux << EOA\n", fp);
fo... | plotspec_print_heredata | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_remove_bars(GPT_SPEC *spec) {
plotbars_free(spec->bars);
spec->bars = 0;
spec->nbars = 0;
} | void plotspec_remove_bars(GPT_SPEC *spec) {
plotbars_free(spec->bars);
spec->bars = NULL;
spec->nbars = 0;
} | plotspec_remove_bars | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotspec_set_bar_info(GPT_SPEC *spec, int i, double t1, double t2) {
if (i >= spec->bars->n)
return 2;
*spec->bars->dx[i] = t1;
spec->bars->dx[i][1] = t2;
return 0;
} | int plotspec_set_bar_info(GPT_SPEC *spec, int i, double t1, double t2) {
if (i < spec->bars->n) {
spec->bars->dx[i][0] = t1;
spec->bars->dx[i][1] = t2;
return 0;
} else {
return E_DATA;
}
} | plotspec_set_bar_info | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_set_bars_limits(GPT_SPEC *spec, double t1, double t2, double ymin,
double ymax) {
if (spec->bars) {
spec->bars->t1 = t1;
spec->bars->t2 = t2;
spec->bars->ymin = ymin;
spec->bars->ymax = ymax;
}
} | void plotspec_set_bars_limits(GPT_SPEC *spec, double t1, double t2, double ymin,
double ymax) {
if (spec->bars != NULL) {
spec->bars->t1 = t1;
spec->bars->t2 = t2;
spec->bars->ymin = ymin;
spec->bars->ymax = ymax;
}
} | plotspec_set_bars_limits | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plotspec_set_fitted_line(GPT_SPEC *spec, FitType f, double x0) {
double *b;
switch (f) {
case PLOT_FIT_OLS:
b = spec->b_ols->val;
break;
case PLOT_FIT_QUADRATIC:
b = spec->b_quad->val;
break;
case PLOT_FIT_CUBIC:
b = spec->b_cub->val;
break;
case PLOT_FIT_INVERSE:
b = spec-... | static void plotspec_set_fitted_line(GPT_SPEC *spec, FitType f, double x0) {
double pd = spec->pd;
const double *b;
if (f == PLOT_FIT_OLS) {
b = spec->b_ols->val;
} else if (f == PLOT_FIT_QUADRATIC) {
b = spec->b_quad->val;
} else if (f == PLOT_FIT_CUBIC) {
b = spec->b_cub->val;
} else if (f ==... | plotspec_set_fitted_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plotvar_code(const DATASET *dset, gretlopt opt) {
if ((opt & 0x40000) != 0 && dset && dset->structure == 1 &&
(dset->pd == 5 || dset->pd == 6 || dset->pd == 7 || dset->pd == 52) &&
strchr(dset->stobs, 45)) {
return 2;
}
if (!dset || dset->structure != 1 && dset->structure != 5)
return 1;
... | static int plotvar_code(const DATASET *dset, gretlopt opt) {
if ((opt & OPT_S) && calendar_data(dset)) {
return PLOTVAR_TIME;
} else if (!dataset_is_time_series(dset)) {
return PLOTVAR_INDEX;
} else if (dset->pd == 1) {
return PLOTVAR_ANNUAL;
} else if (dset->pd == 4) {
return PLOTVAR_QUARTERS;
... | plotvar_code | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int plugin_index_lookup(const char *name) {
gpointer ptr;
if (name) {
if (!pht_0)
pht_0 = gretl_plugin_hash_init();
ptr = (gpointer)g_hash_table_lookup(pht_0, name);
if (ptr)
return (int)ptr;
else
return 0;
} else {
if (pht_0) {
g_hash_table_destroy(pht_0);
pht_0... | static int plugin_index_lookup(const char *name) {
static GHashTable *pht;
gpointer ptr;
if (name == NULL) {
if (pht != NULL) {
g_hash_table_destroy(pht);
pht = NULL;
}
return 0;
}
if (pht == NULL) {
pht = gretl_plugin_hash_init();
}
ptr = g_hash_table_lookup(pht, name);
... | plugin_index_lookup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void plugins_cleanup() {
int i;
for (i = 1; i < 51; ++i) {
if (plugins[i].handle) {
close_plugin(plugins[i].handle);
plugins[i].handle = 0;
}
}
plugin_index_lookup(0);
} | void plugins_cleanup(void) {
int i, n = sizeof(plugins) / sizeof(plugins[0]);
for (i = 1; i < n; i++) {
if (plugins[i].handle != NULL) {
close_plugin(plugins[i].handle);
plugins[i].handle = NULL;
}
}
plugin_index_lookup(NULL);
} | plugins_cleanup | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double poisson_cdf(double lambda, int k) {
double x;
x = NAN;
if (lambda >= 0.0 && k >= 0) {
x = pdtr(k, lambda);
if (get_cephes_errno())
return NAN;
}
return x;
} | static double poisson_cdf(double lambda, int k) {
double x = NADBL;
if (lambda >= 0 && k >= 0) {
x = pdtr(k, lambda);
if (get_cephes_errno()) {
x = NADBL;
}
}
return x;
} | poisson_cdf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double poisson_cdf_comp(double lambda, int k) {
double x;
x = NAN;
if (lambda >= 0.0 && k >= 0) {
x = pdtrc(k, lambda);
if (get_cephes_errno())
return NAN;
}
return x;
} | static double poisson_cdf_comp(double lambda, int k) {
double x = NADBL;
if (lambda >= 0 && k >= 0) {
x = pdtrc(k, lambda);
if (get_cephes_errno()) {
x = NADBL;
}
}
return x;
} | poisson_cdf_comp | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double poisson_cdf_inverse(double lambda, double p) {
return poissinv(p, lambda);
} | static double poisson_cdf_inverse(double lambda, double p) {
return poissinv(p, lambda);
} | poisson_cdf_inverse | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double poisson_critval(double mu, double a) {
int k;
int k0_0;
k0_0 = 0;
if (mu <= 0.0 || a <= 0.0 || a >= 1.0)
return NAN;
if (mu >= 10.0 && a < 0.5) {
k0_0 = (int)(mu - 1.0) + 1;
poisson_cdf(mu, (int)(mu - 1.0));
}
for (k = k0_0; poisson_cdf(mu, k) < 1.0 - a; ++k)
;
return (double)k;
... | static double poisson_critval(double mu, double a) {
double pk = 0.0;
double ac = 1 - a;
int k, k0 = 0;
if (mu <= 0 || a <= 0 || a >= 1) {
return NADBL;
}
if (mu >= 10 && a < 0.5) {
k0 = mu - 1;
pk = poisson_cdf(mu, k0++);
}
for (k = k0;; k++) {
pk = poisson_cdf(mu, k);
if (pk >= ... | poisson_critval | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double poisson_pmf(double lambda, int k) {
int i;
double p;
double den;
double l0;
if (lambda <= 0.0 || k < 0)
return NAN;
den = x_factorial((double)k);
l0 = exp(COERCE_DOUBLE(*(_QWORD *)&lambda ^ 0x8000000000000000LL));
if (fabs(den) <= 1.797693134862316e308)
p = pow(lambda, (double)k) * l0 / ... | double poisson_pmf(double lambda, int k) {
double den, l0, p;
if (lambda <= 0 || k < 0) {
return NADBL;
}
den = x_factorial((double)k);
l0 = exp(-lambda);
if (na(den)) {
p = NADBL;
} else {
p = l0 * pow(lambda, (double)k) / den;
}
if (na(p)) {
int i;
p = l0;
for (i = 1; i ... | poisson_pmf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int poisson_pmf_array(double lambda, double *x, int n) {
int i;
int ia;
int j;
int k;
double p;
double l0;
double den;
if (lambda > 0.0) {
l0 = exp(COERCE_DOUBLE(*(_QWORD *)&lambda ^ 0x8000000000000000LL));
for (ia = 0; ia < n; ++ia) {
k = (int)x[ia];
den = x_factorial((double)k);
... | static int poisson_pmf_array(double lambda, double *x, int n) {
double den, l0, p;
int i, j, k;
if (lambda <= 0) {
for (i = 0; i < n; i++) {
x[i] = NADBL;
}
return 0;
}
l0 = exp(-lambda);
for (i = 0; i < n; i++) {
k = x[i];
den = x_factorial((double)k);
if (na(den)) {
... | poisson_pmf_array | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double polevl(double x, double *coef, int N) {
double *v3;
double ans;
double *p;
p = coef + 1;
ans = *coef;
do {
v3 = p++;
ans = *v3 + ans * x;
--N;
} while (N);
return ans;
} | double polevl(double x, double *coef, int N) {
double ans;
int i;
double *p;
p = coef;
ans = *p++;
i = N;
do {
ans = ans * x + *p++;
} while (--i);
return ans;
} | polevl | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int polrt(double *xcof, double *cof, int m, cmplx *root) {
double *v5;
double *v6;
double *v7;
double *v8;
double *v9;
double *v10;
double *v11;
double *v12;
double *v13;
double *v14;
double *v15;
int i;
int ia;
int j;
int ja;
int jb;
int n;
int n1;
int n2;
int nroot;
int iter;... | int polrt(double *xcof, double *cof, int m, cmplx *root) {
register double *p, *q;
int i, j, nsav, n, n1, n2, nroot, iter, retry;
int final;
double mag, cofj;
cmplx x0, x, xsav, dx, t, t1, u, ud;
final = 0;
n = m;
if (n <= 0) {
return 1;
}
if (n > 36) {
return 2;
}
if (xcof[m] == 0.0) ... | polrt | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double poly(const float *cc, int n, float x) {
int j;
double p;
double ret;
ret = *cc;
if (n > 1) {
p = (float)(cc[n - 1] * x);
for (j = n - 2; j > 0; --j)
p = x * (cc[j] + p);
return ret + p;
}
return ret;
} | static double poly(const float *cc, int n, float x) {
double p, ret = cc[0];
int j;
if (n > 1) {
p = x * cc[n - 1];
for (j = n - 2; j > 0; j--) {
p = (p + cc[j]) * x;
}
ret += p;
}
return ret;
} | poly | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int poly_trend(const double *x, double *fx, const DATASET *dset, int order) {
int t1;
int t2;
int err;
int T;
unsigned long v10;
v10 = __readfsqword(0x28u);
t1 = dset->t1;
t2 = dset->t2;
if (dset && dset->structure == 2) {
gretl_errmsg_set("polyfit: panel data not supported");
return 10;
} ... | int poly_trend(const double *x, double *fx, const DATASET *dset, int order) {
int t1 = dset->t1, t2 = dset->t2;
int T, err;
if (dataset_is_panel(dset)) {
gretl_errmsg_set("polyfit: panel data not supported");
return E_PDWRONG;
}
err = series_adjust_sample(x, &t1, &t2);
if (err) {
return err;
... | poly_trend | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void poly_weights(double *w, int T, double wmax, double midfrac, gretlopt opt) {
int v5;
double *v6;
int t;
int cut;
double wt;
double a;
double b;
double z1;
a = 0.0;
b = 0.0;
if (midfrac <= 0.0)
cut = T / 2;
else
cut = (int)round((1.0 - midfrac) * (double)T / 2.0);
if (opt == OPT_Q)... | void poly_weights(double *w, int T, double wmax, double midfrac, gretlopt opt) {
double wt, a = 0, b = 0;
int t, cut, T2 = T / 2;
if (midfrac > 0) {
cut = round(T * (1.0 - midfrac) / 2.0);
} else {
cut = T2;
}
if (opt == OPT_Q) {
double z1, z2, det;
if (midfrac > 0) {
z1 = cut;
... | poly_weights | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int pooled_autocorr_test(MODEL *pmod, DATASET *dset, gretlopt opt, PRN *prn) {
MODEL v5;
PRN *prna;
gretlopt opta;
DATASET *dseta;
MODEL *pmoda;
int i;
int vi;
int err;
int quiet;
gretlopt auxopt;
int df_0;
int *ulist;
double tstat;
double pval;
ModelTest *test;
MODEL tmp;
unsigned lon... | static int pooled_autocorr_test(MODEL *pmod, DATASET *dset, gretlopt opt,
PRN *prn) {
int quiet = (opt & OPT_Q);
int *ulist = NULL;
int i, vi = 0;
int err = 0;
if (pmod->full_n != dset->n) {
return E_DATA;
}
err = dataset_add_NA_series(dset, 1);
if (!err) {
vi =... | pooled_autocorr_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double pooled_ll(const MODEL *pmod) {
double v2;
double v3;
v3 = -((double)pmod->nobs / 2.0);
v2 = 2.837877066409345 - log((double)pmod->nobs);
return (log(pmod->ess) + v2) * v3;
} | static double pooled_ll(const MODEL *pmod) {
double n = pmod->nobs;
return -(n / 2.0) * (1.0 + LN_2_PI - log(n) + log(pmod->ess));
} | pooled_ll | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int pop_program_state() {
int err;
int fdp;
err = 0;
if (n_states <= 1)
return 1;
fdp = state->flags & 8;
state = (set_state *)state_stack->pdata[--state_idx];
if (fdp && (state->flags & 8) == 0)
libset_set_decpoint(0);
return err;
} | int pop_program_state(void) {
int err = 0;
if (n_states < 2) {
err = 1;
} else {
int fdp = state->flags & FORCE_DECPOINT;
state_idx--;
state = g_ptr_array_index(state_stack, state_idx);
if (fdp && !(state->flags & FORCE_DECPOINT)) {
libset_set_decpoint(0);
}
}
#if PPDEBUG
pri... | pop_program_state | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void pop_verbosity(fncall *call) {
set_gretl_messages(call->flags & 2);
set_gretl_echo(call->flags & 4);
} | static void pop_verbosity(fncall *call) {
set_gretl_messages(call->flags & FC_PREV_MSGS);
set_gretl_echo(call->flags & FC_PREV_ECHO);
} | pop_verbosity | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int positive_int_from_string(const char *s) {
int ret;
char *test[2];
test[1] = (char *)__readfsqword(0x28u);
ret = -1;
if (s) {
if (*s) {
*__errno_location() = 0;
ret = strtol(s, test, 10);
if (*test[0] || !strcmp(s, test[0]) || *__errno_location() == 34)
return -1;
}
}
... | int positive_int_from_string(const char *s) {
int ret = -1;
if (s != NULL && *s != '\0') {
char *test;
errno = 0;
ret = strtol(s, &test, 10);
if (*test != '\0' || !strcmp(s, test) || errno == ERANGE) {
ret = -1;
}
}
return ret;
} | positive_int_from_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int postprocess_daily_data(DATASET *dset, const int *list) {
int t;
int i;
int ia;
int n_ok;
int n_miss;
double xsum;
double *x;
double *xa;
for (t = dset->t1; t <= dset->t2; ++t) {
xsum = 0.0;
n_miss = 0;
n_ok = 0;
for (i = 1; i <= *list; ++i) {
x = dset->Z[list[i]];
if (... | int postprocess_daily_data(DATASET *dset, const int *list) {
double *x, xbar, xsum;
int t, i, n_ok, n_miss;
int err = 0;
for (t = dset->t1; t <= dset->t2; t++) {
xsum = 0.0;
n_ok = n_miss = 0;
for (i = 1; i <= list[0]; i++) {
x = dset->Z[list[i]];
if (na(x[t])) {
n_miss++;
... | postprocess_daily_data | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *powterm(parser *p, NODE *l) {
int v2;
int v4;
int flags;
int v6;
int v7;
int v8;
int next;
int sub;
int opt;
int unset;
int k;
int sym;
NODE *t;
unsigned long v16;
v16 = __readfsqword(0x28u);
if (p->sym == 8) {
v2 = 1;
} else if (p->sym == 7) {
v2 = 2;
} else {
v2 ... | static NODE *powterm(parser *p, NODE *l) {
int sym = p->sym == B_SUB ? U_NEG : p->sym == B_ADD ? U_POS : p->sym;
int opt = OPT_NONE;
int next = 0;
NODE *t = NULL;
if (p->err) {
return NULL;
}
#if SDEBUG
fprintf(stderr, "powterm, starting: p->sym = %d ('%s'), p->ch = '%c' (%d)\n",
p->sym, ... | powterm | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int pprintf(PRN *prn, const char *format, ...) {
long v2;
long v3;
long v4;
long v5;
int plena;
int plen;
int rem;
int rema;
gchar *tmp;
size_t newsize;
va_list args;
unsigned long v14;
long v15;
long v16;
long v17;
long v18;
va_start(args, format);
v2 = va_arg(args, _QWORD);
v3 =... | int pprintf(PRN *prn, const char *format, ...) {
va_list args;
int rem, plen = 0;
if (prn == NULL || prn->fixed) {
return 0;
}
if (format != NULL && *format != '\0') {
prn->nlcount = get_nl_count(format);
}
if (prn->fp != NULL) {
va_start(args, format);
plen = vfprintf(prn->fp, format,... | pprintf | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void pprintf2(PRN *prn, const char *format, ...) {
long v2;
long v3;
long v4;
long v5;
int plen;
int rem;
int rema;
va_list args;
unsigned long v10;
long v11;
long v12;
long v13;
long v14;
va_start(args, format);
v2 = va_arg(args, _QWORD);
v3 = va_arg(args, _QWORD);
v4 = va_arg(args, ... | void pprintf2(PRN *prn, const char *format, ...) {
va_list args;
int rem, plen = 0;
if (prn == NULL || prn->fixed) {
return;
}
if (prn->fp != NULL) {
va_start(args, format);
vfprintf(prn->fp, format, args);
va_end(args);
return;
}
if (strncmp(format, "@init", 5) == 0) {
pprintf... | pprintf2 | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int pprintf_init(PRN *prn) {
int ret;
ret = 0;
prn->bufsize = 2048;
prn->buf = (char *)malloc(prn->bufsize);
if (!prn->buf)
return -1;
memset(prn->buf, 0, sizeof(char));
prn->blen = 0;
return ret;
} | static int pprintf_init(PRN *prn) {
int ret = 0;
prn->bufsize = INIT_SIZE;
prn->buf = malloc(prn->bufsize);
#if PRN_DEBUG
fprintf(stderr, "pprintf: malloc'd %d bytes at %p\n", (int)prn->bufsize,
(void *)prn->buf);
#endif
if (prn->buf == NULL) {
ret = -1;
} else {
memset(prn->buf, 0, 1);... | pprintf_init | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int pputc(PRN *prn, int c) {
char s[2];
unsigned long v4;
v4 = __readfsqword(0x28u);
if (!prn || prn->fixed)
return 0;
if (c == 10) {
++prn->nlcount;
} else if (c) {
prn->nlcount = 0;
}
if (prn->fp) {
fputc(c, prn->fp);
return 1;
} else if (prn->fz) {
s[0] = c;
s[1] = 0;
... | int pputc(PRN *prn, int c) {
if (prn == NULL || prn->fixed) {
return 0;
}
if (c == '\n')
prn->nlcount += 1;
else if (c != '\0')
prn->nlcount = 0;
if (prn->fp != NULL) {
fputc(c, prn->fp);
return 1;
} else if (prn->fz != NULL) {
char s[2] = {c, '\0'};
return gzputs(prn->fz, s);... | pputc | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int pputs(PRN *prn, const char *s) {
int rem;
int slen;
if (!prn || prn->fixed)
return 0;
slen = strlen(s);
if (slen > 0)
prn->nlcount = get_nl_count(s);
if (prn->fp) {
fputs(s, prn->fp);
return slen;
} else if (prn->fz) {
return gzputs(prn->fz, s);
} else if (prn->buf) {
for (r... | int pputs(PRN *prn, const char *s) {
int slen, rem;
if (prn == NULL || prn->fixed) {
return 0;
}
slen = strlen(s);
if (slen > 0) {
prn->nlcount = get_nl_count(s);
}
if (prn->fp != NULL) {
fputs(s, prn->fp);
return slen;
} else if (prn->fz != NULL) {
return gzputs(prn->fz, s);
}
... | pputs | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
char *precompute_mask(const char *s, const char *oldmask, DATASET *dset,
PRN *prn, int *err) {
char *tmpmask;
char *newmask;
tmpmask = make_submask(dset->n);
newmask = 0;
if (!tmpmask)
*err = 12;
if (!*err)
*err = mask_from_temp_dummy(s, dset, tmpmask, prn);
if (!*err) {
... | static char *precompute_mask(const char *s, const char *oldmask, DATASET *dset,
PRN *prn, int *err) {
char *tmpmask = make_submask(dset->n);
char *newmask = NULL;
#if SUBDEBUG
fprintf(stderr, "restrict_sample: precomputing new mask\n");
#endif
if (tmpmask == NULL) {
*err = E_A... | precompute_mask | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int prepare_model_coeff(const MODEL *pmod, const DATASET *dset, int i,
int adfnum, model_coeff *mc, PRN *prn) {
_BOOL4 v6;
int gotnan;
double *slopes;
gotnan = 0;
model_coeff_init(mc);
v6 = pmod->ci != 70 && pmod->ci != 102 ||
gretl_model_get_int(pmod, "ordered") ||
gr... | static int prepare_model_coeff(const MODEL *pmod, const DATASET *dset, int i,
int adfnum, model_coeff *mc, PRN *prn) {
int gotnan = 0;
model_coeff_init(mc);
mc->show_pval = !binary_model(pmod) || (pmod->opt & OPT_P);
if (tex_format(prn)) {
make_tex_coeff_name(pmod, dset, i,... | prepare_model_coeff | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void prepare_stringvec_return(NODE *ret, parser *p, char **S, int ns,
int write_vec) {
int vnew;
p->flags |= 0x20000000u;
if (p->lh.t == 55) {
if (write_vec)
memcpy(p->dset->Z[p->lh.vnum], ret->v.str, 8LL * p->dset->n);
series_set_string_vals_direct(p->dset, p->lh.vnum... | static void prepare_stringvec_return(NODE *ret, parser *p, char **S, int ns,
int write_vec) {
p->flags |= P_STRVEC;
if (p->lh.t == SERIES) {
if (write_vec) {
double *targ = p->dset->Z[p->lh.vnum];
size_t nb = p->dset->n * sizeof *targ;
memcpy(targ, ret->... | prepare_stringvec_return | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *pretend_matrix_scalar_func(NODE *n, int f, parser *p) {
NODE *ret;
ret = get_aux_node(p, 54, 0, 0);
if (ret && (p->flags & 2) != 0) {
switch (f) {
case 414:
case 310:
case 415:
case 312:
case 311:
case 308:
ret->v.str = n->v.str;
break;
case 302:
ret->v.str... | static NODE *pretend_matrix_scalar_func(NODE *n, int f, parser *p) {
NODE *ret = aux_scalar_node(p);
if (ret != NULL && starting(p)) {
if (f == F_SUM || f == F_SUMALL || f == F_MEAN || f == F_MAX ||
f == F_MIN || f == F_MEDIAN) {
ret->v.xval = n->v.xval;
} else if (f == F_NOBS) {
ret->v... | pretend_matrix_scalar_func | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void prhdr(const char *str, const DATASET *dset, int missing, PRN *prn) {
char *v4;
char *v5;
char *tmp;
char date1[16];
char date2[24];
unsigned long v11;
v11 = __readfsqword(0x28u);
ntolabel(date1, dset->t1, dset);
ntolabel(date2, dset->t2, dset);
pputc(prn, 10);
v4 = gettext("%s, using the obs... | static void prhdr(const char *str, const DATASET *dset, int missing, PRN *prn) {
char date1[OBSLEN], date2[OBSLEN];
gchar *tmp;
ntolabel(date1, dset->t1, dset);
ntolabel(date2, dset->t2, dset);
pputc(prn, '\n');
tmp = g_strdup_printf(_("%s, using the observations %s - %s"), str, date1,
... | prhdr | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_DPD_stats(const MODEL *pmod, PRN *prn) {
char *v2;
double v3;
double v4;
int k;
double x;
double xa;
double y;
if (pmod->ID >= 0) {
ensure_vsep(prn);
if (tex_format(prn))
pputs(prn, "\\begin{tabular}{ll}\n");
k = gretl_model_get_int(pmod, "ninst");
if (k > 0) {
v2... | static void print_DPD_stats(const MODEL *pmod, PRN *prn) {
double x, y;
int k;
if (pmod->ID < 0) {
return;
}
ensure_vsep(prn);
if (tex_format(prn)) {
pputs(prn, "\\begin{tabular}{ll}\n");
}
k = gretl_model_get_int(pmod, "ninst");
if (k > 0) {
pprintf(prn, _("Number of instruments = %d"... | print_DPD_stats | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_GMM_stats(const MODEL *pmod, PRN *prn) {
double x;
ensure_vsep(prn);
GMM_crit_line(pmod, prn);
x = gretl_model_get_double(pmod, "J_test");
if (fabs(x) <= 1.797693134862316e308)
print_model_chi2_test(pmod, x, 3, prn);
if (!tex_format(prn))
gretl_prn_newline(prn);
} | static void print_GMM_stats(const MODEL *pmod, PRN *prn) {
double x;
ensure_vsep(prn);
GMM_crit_line(pmod, prn);
x = gretl_model_get_double(pmod, "J_test");
if (!na(x)) {
print_model_chi2_test(pmod, x, J_TEST, prn);
}
if (!tex_format(prn)) {
gretl_prn_newline(prn);
}
} | print_GMM_stats | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_GNR_info(const MODEL *pmod, PRN *prn) {
char *v2;
char *v3;
const char *v4;
char *v5;
int rd;
const char *msg;
double R2;
double tmax;
R2 = gretl_model_get_double(pmod, "GNR_Rsquared");
tmax = gretl_model_get_double(pmod, "GNR_tmax");
rd = gretl_model_get_int(pmod, "near-singular");
... | static void print_GNR_info(const MODEL *pmod, PRN *prn) {
double R2 = gretl_model_get_double(pmod, "GNR_Rsquared");
double tmax = gretl_model_get_double(pmod, "GNR_tmax");
int rd = gretl_model_get_int(pmod, "near-singular");
const char *msg;
if (na(R2) && na(tmax) && rd == 0) {
return;
}
ensure_vsep... | print_GNR_info | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_HET_1(double z, double pval, PRN *prn) {
char *v3;
char *v4;
char *v5;
v3 = gettext("Pesaran-Taylor test for heteroskedasticity");
pprintf(prn, "\n%s\n", v3);
v4 = gettext("Test statistic");
pprintf(prn, "\n%s: HET_1 = %f,\n", v4, z);
v5 = gettext("with p-value");
pprintf(prn, "%s = 2 * P(... | static void print_HET_1(double z, double pval, PRN *prn) {
pprintf(prn, "\n%s\n", _("Pesaran-Taylor test for heteroskedasticity"));
pprintf(prn, "\n%s: HET_1 = %f,\n", _("Test statistic"), z);
pprintf(prn, "%s = 2 * P(z > %f) = %.3g\n\n", _("with p-value"), z, pval);
} | print_HET_1 | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_HET_1_results(const MODEL *pmod, PRN *prn) {
double v2;
double v3;
char *v4;
char *v5;
char *v6;
char *v7;
char *v8;
char *v9;
double v10;
double z;
double pv;
z = fabs(pmod->coeff[1]) / pmod->sderr[1];
v2 = normal_cdf(z);
pv = 1.0 - v2 + 1.0 - v2;
if (plain_format(prn)) {
... | static void print_HET_1_results(const MODEL *pmod, PRN *prn) {
double z = fabs(pmod->coeff[1]) / pmod->sderr[1];
double pv = 2.0 * (1 - normal_cdf(z));
if (plain_format(prn)) {
pprintf(prn, "\n%s: HET_1 = |%f| / %f = %f,\n", _("Test statistic"),
pmod->coeff[1], pmod->sderr[1], z);
pprintf(prn... | print_HET_1_results | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_Johansen_test_case(JohansenCode jcode, PRN *prn) {
char *v2;
const char *jcase[5];
unsigned long v4;
v4 = __readfsqword(0x28u);
jcase[0] = "Case 1: No constant";
jcase[1] = "Case 2: Restricted constant";
jcase[2] = "Case 3: Unrestricted constant";
jcase[3] = "Case 4: Restricted trend, unrest... | void print_Johansen_test_case(JohansenCode jcode, PRN *prn) {
const char *jcase[] = {N_("Case 1: No constant"),
N_("Case 2: Restricted constant"),
N_("Case 3: Unrestricted constant"),
N_("Case 4: Restricted trend, unrestricted constant"),
... | print_Johansen_test_case | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_LR_stat(double x, int df_0, PRN *prn) {
double v3;
char *v4;
v3 = chisq_cdf_comp((double)df_0, x);
if (fabs(v3) <= 1.797693134862316e308) {
if (tex_format(prn)) {
pprintf(prn, "$2 (l_u - l_r) = %g$", x);
gretl_prn_newline(prn);
pprintf(prn, "$P(\\chi^2_{%d} > %g) = %g$", df_0, ... | static void print_LR_stat(double x, int df, PRN *prn) {
double pv = chisq_cdf_comp(df, x);
if (na(pv)) {
return;
}
if (tex_format(prn)) {
pprintf(prn, "$2 (l_u - l_r) = %g$", x);
gretl_prn_newline(prn);
pprintf(prn, "$P(\\chi^2_{%d} > %g) = %g$", df, x, pv);
} else if (rtf_format(prn)) {
... | print_LR_stat | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_NR_status(int status, double crittol, double gradtol, double sumgrad,
PRN *prn) {
char *v5;
char *v6;
char *v7;
char *v8;
int msgs;
msgs = gretl_messages_on();
switch (status) {
case 1:
if (msgs) {
v5 = gettext("Gradient within tolerance (%g)\n");
pprintf... | static void print_NR_status(int status, double crittol, double gradtol,
double sumgrad, PRN *prn) {
int msgs = gretl_messages_on();
if (status == GRADTOL_MET) {
if (msgs) {
pprintf(prn, _("Gradient within tolerance (%g)\n"), gradtol);
}
} else if (status == CRITTOL_MET) ... | print_NR_status | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_VECM_coint_eqns(GRETL_VAR *jvar, const DATASET *dset, PRN *prn) {
int v3;
char *v4;
char *v5;
int v6;
char *v7;
char *v8;
int i;
int ia;
int j;
int ja;
int jb;
int jc;
int rtf;
int rows;
int rowsa;
int nwid;
JohansenInfo *jv;
char *src;
double x;
double xa;
char name... | static void print_VECM_coint_eqns(GRETL_VAR *jvar, const DATASET *dset,
PRN *prn) {
JohansenInfo *jv = jvar->jinfo;
int rtf = rtf_format(prn);
char namefmt[16];
char s[16], vname[32];
int rows = gretl_matrix_rows(jv->Beta);
int nwid;
int i, j;
double x;
pprintf(prn, ... | print_VECM_coint_eqns | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_VECM_omega(GRETL_VAR *jvar, const DATASET *dset, PRN *prn) {
char *v3;
double v4;
char *v5;
int vwidth;
int wi;
int wia;
int wib;
int i;
int ia;
int j;
int rtf;
int w0;
const int *list;
char *src;
char *srca;
char vname[40];
unsigned long v20;
v20 = __readfsqword(0x28u);
... | static void print_VECM_omega(GRETL_VAR *jvar, const DATASET *dset, PRN *prn) {
int rtf = rtf_format(prn);
int *list = jvar->ylist;
const char *src;
char vname[32] = {0};
int vwidth = 13;
int w0, wi = 12;
int i, j;
pprintf(prn, "%s:\n", _("Cross-equation covariance matrix"));
gretl_prn_newline(prn);
... | print_VECM_omega | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_add_omit_null(const int *list, const DATASET *dset, gretlopt opt,
PRN *prn) {
int v4;
char *v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
char *v12;
char *v13;
char *v14;
int i;
int nc;
char *vname;
if (list)
v4 = *list;
else
... | void print_add_omit_null(const int *list, const DATASET *dset, gretlopt opt,
PRN *prn) {
int nl = list == NULL ? 0 : list[0];
if (nl == 1 && !(opt & OPT_S)) {
pputs(prn, "\n ");
pprintf(prn, _("Null hypothesis: the regression parameter is zero for %s"),
dset->varname[... | print_add_omit_null | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int print_add_omit_varnames(const char *s, PRN *prn) {
const char *sa;
const char *ending;
sa = s;
if (!s || !*s)
return 1;
if (plain_format(prn)) {
ending = "\n ";
} else if (tex_format(prn)) {
ending = "\\\\\n \\qquad ";
} else {
if (!rtf_format(prn))
return 1;
ending = "\\... | static int print_add_omit_varnames(const char *s, PRN *prn) {
const char *endings[] = {"\n ", "\\\\\n \\qquad ", "\\par\n "};
const char *ending = NULL;
if (s == NULL || *s == '\0') {
return 1;
}
if (plain_format(prn)) {
ending = endings[0];
} else if (tex_format(prn)) {
ending = endings... | print_add_omit_varnames | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_adf_results(adf_info *ainfo, MODEL *dfmod, int *blurb_done,
gretlopt opt, int test_down, PRN *prn) {
char *v6;
char *v7;
double pval;
char *v9;
double v10;
char *v11;
char *v12;
unsigned int T;
char *v14;
char *v15;
const char *v16;
char *v17;
const char *vnam... | static void print_adf_results(adf_info *ainfo, MODEL *dfmod, int *blurb_done,
gretlopt opt, int test_down, PRN *prn) {
const char *urcstrs[] = {"nc", "c", "ct", "ctt"};
gchar *pvstr = NULL;
char taustr[16];
int i;
if (prn == NULL)
return;
i = ainfo->det - 1;
if (na(ain... | print_adf_results | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int print_ar_aux_model(MODEL *pmod, DATASET *dset, int j, PRN *prn) {
char *v5;
int err;
int i;
int vi;
gretl_matrix *cse;
gretl_array *S;
const char *heads[3];
unsigned long v14;
v14 = __readfsqword(0x28u);
heads[0] = "First differenced equation (dependent, d_y)";
heads[1] = "Autoregression of r... | static int print_ar_aux_model(MODEL *pmod, DATASET *dset, int j, PRN *prn) {
const char *heads[] = {
N_("First differenced equation (dependent, d_y)"),
N_("Autoregression of residuals (dependent, uhat)"),
N_("Auxiliary regression including lagged residual"),
};
gretl_matrix *cse;
gretl_array *... | print_ar_aux_model | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void print_ar_sum(const MODEL *pmod, PRN *prn) {
char *v2;
int i;
double arsum;
if (pmod->arinfo && *pmod->arinfo->arlist > 1) {
arsum = 0.0;
for (i = 0; i < *pmod->arinfo->arlist; ++i)
arsum = pmod->arinfo->rho[i] + arsum;
v2 = gettext("Sum of AR coefficients");
pprintf(prn, "\n%s = %#g\... | static void print_ar_sum(const MODEL *pmod, PRN *prn) {
if (pmod->arinfo != NULL && pmod->arinfo->arlist[0] > 1) {
double arsum = 0.0;
int i;
for (i = 0; i < pmod->arinfo->arlist[0]; i++) {
arsum += pmod->arinfo->rho[i];
}
pprintf(prn, "\n%s = %#g\n", _("Sum of AR coefficients"), arsum);
... | print_ar_sum | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.