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 |
|---|---|---|---|---|---|---|---|
int row_not_wanted(csvdata *c, int t) {
if (!c->rowmask)
return 0;
if (t >= c->masklen)
return 1;
return c->rowmask->val[t] == 0.0;
} | static int row_not_wanted(csvdata *c, int t) {
if (c->rowmask != NULL) {
if (t >= c->masklen) {
return 1;
} else if (gretl_vector_get(c->rowmask, t) == 0) {
return 1;
}
}
return 0;
} | row_not_wanted | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int row_strlen(const Xtab *tab) {
int i;
int nmax;
int n;
nmax = 0;
for (i = 0; i < tab->rows; ++i) {
n = g_utf8_strlen(tab->Sr[i], -1);
if (n > nmax)
nmax = n;
}
return nmax;
} | static int row_strlen(const Xtab *tab) {
int i, n, nmax = 0;
for (i = 0; i < tab->rows; i++) {
n = g_utf8_strlen(tab->Sr[i], -1);
if (n > nmax) {
nmax = n;
}
}
return nmax;
} | row_strlen | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rows_are_conjugate(const gretl_matrix *y, int i, int k) {
complex_double *v3;
complex_double *v4;
int j;
double imag;
double z1;
for (j = 0; j < y->cols; ++j) {
v3 = &y->z[j * y->rows + i];
imag = v3->imag;
z1 = v3->real;
v4 = &y->z[j * y->rows + k];
if (z1 != v4->real || -v4->imag ... | static int rows_are_conjugate(const gretl_matrix *y, int i, int k) {
double complex z1, z2;
int j;
for (j = 0; j < y->cols; j++) {
z1 = gretl_cmatrix_get(y, i, j);
z2 = gretl_cmatrix_get(y, k, j);
if (z1 != conj(z2)) {
return 0;
}
}
return 1;
} | rows_are_conjugate | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rq_vcv_line(const MODEL *pmod, PRN *prn) {
char *v2;
char *v3;
int free_s;
int robust;
char *s;
double a;
robust = gretl_model_get_int(pmod, "rq_nid");
a = gretl_model_get_double(pmod, "rq_alpha");
free_s = 0;
if (fabs(a) > 1.797693134862316e308) {
if (robust)
s = "Robust (sandwich) ... | static void rq_vcv_line(const MODEL *pmod, PRN *prn) {
int robust = gretl_model_get_int(pmod, "rq_nid");
double a = gretl_model_get_double(pmod, "rq_alpha");
int free_s = 0;
char *s;
if (!na(a)) {
if (robust) {
s = g_strdup_printf(N_("With robust %g percent confidence intervals"),
... | rq_vcv_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rset_VECM_acols(const gretl_restriction *rset) {
if (rset && rset->Ra)
return rset->Ra->cols;
else
return 0;
} | int rset_VECM_acols(const gretl_restriction *rset) {
return (rset == NULL || rset->Ra == NULL) ? 0 : rset->Ra->cols;
} | rset_VECM_acols | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rset_VECM_bcols(const gretl_restriction *rset) {
if (rset && rset->R)
return rset->R->cols;
else
return 0;
} | int rset_VECM_bcols(const gretl_restriction *rset) {
return (rset == NULL || rset->R == NULL) ? 0 : rset->R->cols;
} | rset_VECM_bcols | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rset_add_results(gretl_restriction *rset, double test, double pval,
double lnl) {
rset->test = test;
rset->pval = pval;
rset->lnl = lnl;
} | void rset_add_results(gretl_restriction *rset, double test, double pval,
double lnl) {
rset->test = test;
rset->pval = pval;
rset->lnl = lnl;
} | rset_add_results | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rset_allocate_R_q(gretl_restriction *rset, int nc) {
rset->R = gretl_zero_matrix_new(rset->g, nc);
rset->q = gretl_zero_matrix_new(rset->g, 1);
if (rset->R && rset->q)
return 0;
gretl_matrix_free(rset->R);
gretl_matrix_free(rset->q);
rset->q = 0;
rset->R = rset->q;
return 12;
} | static int rset_allocate_R_q(gretl_restriction *rset, int nc) {
rset->R = gretl_zero_matrix_new(rset->g, nc);
rset->q = gretl_zero_matrix_new(rset->g, 1);
#if RDEBUG
fprintf(stderr, "rset_allocate_R_q: on output R=%p (%dx%d), q=%p (%dx%d)\n",
(void *)rset->R, rset->g, nc, (void *)rset->q, rset->g, 1);
... | rset_allocate_R_q | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rset_expand_R(gretl_restriction *rset, int k) {
int i;
int j;
int jj;
gretl_matrix *R;
R = gretl_zero_matrix_new(rset->g, k);
if (!R)
return 12;
for (i = 0; i < rset->g; ++i) {
jj = 0;
for (j = 0; j < k; ++j) {
if (rset->mask[j]) {
R->val[j * R->rows + i] = rset->R->val[jj *... | static int rset_expand_R(gretl_restriction *rset, int k) {
gretl_matrix *R = NULL;
double rij;
int i, j, jj;
R = gretl_zero_matrix_new(rset->g, k);
if (R == NULL) {
return E_ALLOC;
}
for (i = 0; i < rset->g; i++) {
jj = 0;
for (j = 0; j < k; j++) {
if (rset->mask[j]) {
rij = gr... | rset_expand_R | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_restriction *rset_from_VECM(GRETL_VAR *var, int *err) {
__int128 R;
const gretl_matrix *Ra;
const gretl_matrix *qa;
gretl_restriction *rset;
*(_QWORD *)&R = gretl_VECM_R_matrix(var);
*((_QWORD *)&R + 1) = gretl_VECM_q_matrix(var);
Ra = gretl_VECM_Ra_matrix(var);
qa = gretl_VECM_qa_matrix(var);
... | gretl_restriction *rset_from_VECM(GRETL_VAR *var, int *err) {
const gretl_matrix *R = gretl_VECM_R_matrix(var);
const gretl_matrix *q = gretl_VECM_q_matrix(var);
const gretl_matrix *Ra = gretl_VECM_Ra_matrix(var);
const gretl_matrix *qa = gretl_VECM_qa_matrix(var);
gretl_restriction *rset;
if (R == NULL &&... | rset_from_VECM | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const gretl_matrix *rset_get_R_matrix(const gretl_restriction *rset) {
if (rset)
return rset->R;
else
return 0;
} | const gretl_matrix *rset_get_R_matrix(const gretl_restriction *rset) {
return (rset != NULL) ? rset->R : NULL;
} | rset_get_R_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const gretl_matrix *rset_get_Ra_matrix(const gretl_restriction *rset) {
if (rset)
return rset->Ra;
else
return 0;
} | const gretl_matrix *rset_get_Ra_matrix(const gretl_restriction *rset) {
return (rset != NULL) ? rset->Ra : NULL;
} | rset_get_Ra_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const gretl_matrix *rset_get_q_matrix(const gretl_restriction *rset) {
if (rset)
return rset->q;
else
return 0;
} | const gretl_matrix *rset_get_q_matrix(const gretl_restriction *rset) {
return (rset != NULL) ? rset->q : NULL;
} | rset_get_q_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
const gretl_matrix *rset_get_qa_matrix(const gretl_restriction *rset) {
if (rset)
return rset->qa;
else
return 0;
} | const gretl_matrix *rset_get_qa_matrix(const gretl_restriction *rset) {
return (rset != NULL) ? rset->qa : NULL;
} | rset_get_qa_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rset_record_LR_result(gretl_restriction *rset) {
record_LR_test_result(rset->test, rset->pval, rset->lnl);
} | void rset_record_LR_result(gretl_restriction *rset) {
record_LR_test_result(rset->test, rset->pval, rset->lnl);
} | rset_record_LR_result | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rsqline(const MODEL *pmod, PRN *prn) {
double rsq;
char *v3;
if (fabs(pmod->rsq) <= 1.797693134862316e308) {
if (plain_format(prn)) {
rsq = pmod->rsq;
v3 = gettext("Unadjusted R-squared");
pprintf(prn, " %s = %f\n", v3, rsq);
}
}
} | static void rsqline(const MODEL *pmod, PRN *prn) {
if (!na(pmod->rsq) && plain_format(prn)) {
pprintf(prn, " %s = %f\n", _("Unadjusted R-squared"), pmod->rsq);
}
} | rsqline | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rssline(const MODEL *pmod, PRN *prn) {
double v2;
int gretl_digits;
char *v4;
if (fabs(pmod->ess) <= 1.797693134862316e308 &&
fabs(pmod->tss) <= 1.797693134862316e308 && plain_format(prn)) {
v2 = pmod->tss - pmod->ess;
if (pmod->ci == 83)
gretl_digits = 12;
else
gretl_digits ... | static void rssline(const MODEL *pmod, PRN *prn) {
if (!na(pmod->ess) && !na(pmod->tss) && plain_format(prn)) {
pprintf(prn, " %s = %.*g\n", _("Explained sum of squares"), XDIGITS(pmod),
pmod->tss - pmod->ess);
}
} | rssline | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rtf_doc_format(PRN *prn) {
return prn && (prn->format & 8) != 0 && (prn->format & 4) != 0;
} | int rtf_doc_format(PRN *prn) {
return (prn != NULL && (prn->format & GRETL_FORMAT_RTF) &&
(prn->format & GRETL_FORMAT_DOC));
} | rtf_doc_format | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rtf_format(PRN *prn) { return prn && (prn->format & 0x18) != 0; } | int rtf_format(PRN *prn) {
if (prn != NULL) {
if (prn->format & (GRETL_FORMAT_RTF | GRETL_FORMAT_RTF_TXT)) {
return 1;
}
}
return 0;
} | rtf_format | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rtf_print_coeff(const model_coeff *mc, PRN *prn) {
char *v2;
char *v3;
char *v4;
char *v5;
char *v6;
char *v7;
char pvalstr[24];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (fabs(mc->lo) > 1.797693134862316e308)
pputs(prn, "\\trowd \\trqc "
"\\trgaph30\\trleft-"
... | static void rtf_print_coeff(const model_coeff *mc, PRN *prn) {
if (!na(mc->lo)) {
pputs(prn, RTF_INTVL_ROW);
} else {
pputs(prn, RTF_COEFF_ROW);
}
pprintf(prn, "\\ql %s\\cell", mc->name);
if (na(mc->b)) {
pprintf(prn, " \\qc %s\\cell", _("undefined"));
} else {
rtf_print_double(mc->b, prn)... | rtf_print_coeff | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rtf_print_double(double xx, PRN *prn) {
int gretl_digits;
int v3;
char numstr[40];
unsigned long v5;
v5 = __readfsqword(0x28u);
if (fabs(xx) <= 1.0e-13)
xx = 0.0;
if (xx < 0.0 && gretl_print_has_minus(prn)) {
gretl_digits = get_gretl_digits();
sprintf(numstr, "%#.*g", gretl_digits, fabs(... | static void rtf_print_double(double xx, PRN *prn) {
char numstr[32];
xx = screen_zero(xx);
if (xx < 0 && gretl_print_has_minus(prn)) {
sprintf(numstr, "%#.*g", get_gretl_digits(), fabs(xx));
gretl_fix_exponent(numstr);
pprintf(prn, " \\qc −%s\\cell", numstr);
} else {
sprintf(numstr, "%#.*g", ... | rtf_print_double | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void rtf_print_row_spec(int ncols, int type, PRN *prn) {
int j;
if (type == 1)
pputc(prn, 123);
pputs(prn, "\\trowd\\trautofit1\n\\intbl\n");
for (j = 1; j <= ncols; ++j)
pprintf(prn, "\\cellx%d\n", j);
if (type == 1)
pputs(prn, "\\row }\n");
} | static void rtf_print_row_spec(int ncols, int type, PRN *prn) {
int j;
if (type == RTF_TRAILER) {
pputc(prn, '{');
}
pputs(prn, "\\trowd\\trautofit1\n\\intbl\n");
for (j = 1; j <= ncols; j++) {
pprintf(prn, "\\cellx%d\n", j);
}
if (type == RTF_TRAILER) {
pputs(prn, "\\row }\n");
}
} | rtf_print_row_spec | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int rtfprint(MODEL *pmod, const DATASET *dset, const char *fname,
gretlopt opt) {
int err;
const char *buf;
char *trbuf;
PRN *prn;
FILE *fp;
unsigned long v12;
v12 = __readfsqword(0x28u);
buf = 0;
trbuf = 0;
err = 0;
if ((pmod->ci == 64 || pmod->ci == 104) &&
gretl_model_get_da... | int rtfprint(MODEL *pmod, const DATASET *dset, const char *fname,
gretlopt opt) {
const char *buf = NULL;
char *trbuf = NULL;
PRN *prn;
int err = 0;
if (RQ_SPECIAL_MODEL(pmod)) {
return E_NOTIMP;
}
prn = gretl_print_new(GRETL_PRINT_BUFFER, &err);
if (!err) {
gretl_print_set_form... | rtfprint | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int run_R_binary(const char *buf, const DATASET *dset, gretlopt opt, PRN *prn) {
int err;
err = write_gretl_R_files(buf, dset, opt);
if (!err)
return lib_run_R_sync(opt, prn);
delete_gretl_R_files();
return err;
} | static int run_R_binary(const char *buf, const DATASET *dset, gretlopt opt,
PRN *prn) {
int err = write_gretl_R_files(buf, dset, opt);
if (err) {
delete_gretl_R_files();
} else {
#ifdef G_OS_WIN32
err = win32_lib_run_R_sync(opt, prn);
#else
err = lib_run_R_sync(opt, prn);
#end... | run_R_binary | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int run_script(const char *fname, ExecState *s, DATASET *dset, gretlopt opt,
PRN *prn) {
char *v5;
int err;
int indent;
int echo;
int messages;
int iferr;
FILE *fp;
indent = gretl_if_state_record();
echo = gretl_echo_on();
messages = gretl_messages_on();
err = 0;
fp = gretl_fopen... | static int run_script(const char *fname, ExecState *s, DATASET *dset,
gretlopt opt, PRN *prn) {
int indent = gretl_if_state_record();
int echo = gretl_echo_on();
int messages = gretl_messages_on();
FILE *fp;
int iferr, err = 0;
fp = gretl_fopen(fname, "r");
if (fp == NULL) {
gre... | run_script | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int runs_test(int v, const DATASET *dset, gretlopt opt, PRN *prn) {
int v5;
int v6;
char *v7;
char *v8;
char *v9;
char *v10;
char *v11;
char *v12;
char opta;
int Np;
int Nm;
int t;
int ta;
int tb;
int n;
int runs;
double mu;
double s2;
double sigma;
double z;
double pval;
dou... | int runs_test(int v, const DATASET *dset, gretlopt opt, PRN *prn) {
double xt, *x, mu, s2, sigma;
double N2, z, pval;
int Np, Nm;
int t, n, runs = 1;
n = dset->t2 - dset->t1 + 1;
x = malloc(n * sizeof *x);
if (x == NULL) {
return E_ALLOC;
}
n = 0;
if (opt & OPT_D) {
double xt1;
for ... | runs_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double s_tab_get(int i, int t, series_table *stl, series_table *str) {
double ret;
const char *sr;
sr = series_table_get_string(str, gretl_odinfo.X[i][t]);
ret = series_table_get_value(stl, sr);
if (fabs(ret) > 1.797693134862316e308) {
series_table_add_string(stl, sr);
return series_table_get_value(s... | static double s_tab_get(int i, int t, series_table *stl, series_table *str) {
const double *x = gretl_odinfo.X[i];
const char *sr;
double ret = NADBL;
sr = series_table_get_string(str, x[t]);
ret = series_table_get_value(stl, sr);
if (na(ret)) {
series_table_add_string(stl, sr);
ret = series_tabl... | s_tab_get | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double safe_pow(double x, int n) {
double xa;
double lp;
xa = fabs(x);
if (xa < 1.0e-35)
return 0.0;
lp = log(xa) * (double)n;
if (lp < -80.0)
return 0.0;
if (lp <= 80.0)
return exp(lp);
return 5.54062238439351e34;
} | static double safe_pow(double x, int n) {
double lp;
x = fabs(x);
if (x < NEAR_ZERO) {
return 0.0;
} else {
lp = n * log(x);
if (lp < -80) {
return 0.0;
} else if (lp > 80) {
return exp(80.0);
} else {
return exp(lp);
}
}
} | safe_pow | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void safe_print_line(const char *line, int *plen, PRN *prn) {
int out;
int n;
int m;
const char *p;
char tmp[88];
unsigned long v9;
v9 = __readfsqword(0x28u);
p = line;
out = 0;
n = strlen(line);
while (out < n) {
tmp[0] = 0;
strncat(tmp, p, 0x4Du);
trim_to_length(tmp);
m = strlen... | void safe_print_line(const char *line, int *plen, PRN *prn) {
char tmp[SAFELEN];
const char *q, *p = line;
int n, m, rem, out = 0;
int len0 = *plen;
rem = n = strlen(line);
while (out < n) {
*tmp = 0;
q = p;
strncat(tmp, p, SAFELEN - 1);
len0 = 0;
trim_to_length(tmp - len0);
len0 =... | safe_print_line | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int same_dataset(const MODEL *pmod, const DATASET *dset) {
if (!pmod->submask && !dset->submask)
return 1;
if (pmod->submask && dset->submask)
return submasks_match(dset, pmod);
return 0;
} | int same_dataset(const MODEL *pmod, const DATASET *dset) {
if (pmod->submask == NULL && dset->submask == NULL) {
return 1;
} else if (pmod->submask != NULL && dset->submask != NULL) {
return submasks_match(dset, pmod);
} else {
return 0;
}
} | same_dataset | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void sample_range_get_extrema(const DATASET *dset, int *t1, int *t2) {
fncall *call;
int tvals;
int tvals_4;
tvals = 0;
tvals_4 = dset->n - 1;
if (!allow_full_data) {
call = current_function_call();
if (call) {
tvals = call->obs.t1;
tvals_4 = call->obs.t2 + call->obs.added;
}
}
... | void sample_range_get_extrema(const DATASET *dset, int *t1, int *t2) {
int tvals[2] = {0, dset->n - 1};
if (!allow_full_data) {
fncall *call = current_function_call();
if (call != NULL) {
tvals[0] = call->obs.t1;
tvals[1] = call->obs.t2 + call->obs.added;
}
}
if (t1 != NULL) {
*t1... | sample_range_get_extrema | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int sample_span(const char *stobs, const char *endobs, int pd, int *err) {
int ed1;
int ed2;
int n;
int wd1;
int wd2;
int t2;
int ymd1[3];
int ymd2[3];
DATASET dset;
char obs1[16];
char obs2[24];
unsigned long v19;
v19 = __readfsqword(0x28u);
memset(&dset, 0, sizeof(dset));
if (pd == 1 ||... | int sample_span(const char *stobs, const char *endobs, int pd, int *err) {
char obs1[16], obs2[16];
DATASET dset = {0};
int ymd1[3], ymd2[3];
int n, nf, t2, span = -1;
if (pd == 1 || pd == 12 || (pd >= 4 && pd <= 7) || pd == 52) {
;
} else {
*err = E_INVARG;
return -1;
}
n = strlen(stobs);... | sample_span | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int satterthwaite_df(double v1, int n1, double v2, int n2) {
double rtnum;
rtnum = v2 / (double)n2 + v1 / (double)n1;
return (int)floor(rtnum * rtnum /
(v1 / (double)n1 * (v1 / (double)n1) / (double)(n1 - 1) +
v2 / (double)n2 * (v2 / (double)n2) / (double)(n2 - 1)));
} | int satterthwaite_df(double v1, int n1, double v2, int n2) {
double rtnum = v1 / n1 + v2 / n2;
double d1 = (v1 / n1) * (v1 / n1) / (n1 - 1);
double d2 = (v2 / n2) * (v2 / n2) / (n2 - 1);
double v = rtnum * rtnum / (d1 + d2);
return (int)floor(v);
} | satterthwaite_df | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_QLR_test(MODEL *pmod, const char *datestr, double X2, double pval,
int df_0) {
ModelTest *test;
test = model_test_new(GRETL_TEST_QLR);
if (test) {
model_test_set_teststat(test, 9u);
model_test_set_param(test, datestr);
model_test_set_value(test, X2);
model_test_set_pv... | static void save_QLR_test(MODEL *pmod, const char *datestr, double X2,
double pval, int df) {
ModelTest *test = model_test_new(GRETL_TEST_QLR);
if (test != NULL) {
model_test_set_teststat(test, GRETL_STAT_SUP_WALD);
model_test_set_param(test, datestr);
model_test_set_value(tes... | save_QLR_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_between_model(MODEL *pmod, const int *blist, DATASET *gset,
panelmod_t *pan) {
int i;
int err;
gretl_matrix *uh;
gretl_matrix *yh;
err = 0;
pmod->ci = 93;
pmod->opt |= 2u;
pmod->dw = NAN;
gretl_model_add_panel_varnames(pmod, gset, 0);
uh = gretl_matrix_alloc(pmod->no... | static int save_between_model(MODEL *pmod, const int *blist, DATASET *gset,
panelmod_t *pan) {
gretl_matrix *uh, *yh;
int i, err = 0;
pmod->ci = PANEL;
pmod->opt |= OPT_B;
pmod->dw = NADBL;
gretl_model_add_panel_varnames(pmod, gset, NULL);
uh = gretl_column_vector_alloc(pmo... | save_between_model | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_breusch_pagan_result(panelmod_t *pan) {
double v1;
ModelTest *test;
if (pan->realmod && fabs(pan->BP) <= 1.797693134862316e308) {
test = model_test_new(GRETL_TEST_PANEL_BP);
if (test) {
model_test_set_teststat(test, 8u);
model_test_set_dfn(test, 1);
model_test_set_value(test, ... | static void save_breusch_pagan_result(panelmod_t *pan) {
ModelTest *test;
if (pan->realmod == NULL || na(pan->BP)) {
return;
}
test = model_test_new(GRETL_TEST_PANEL_BP);
if (test != NULL) {
model_test_set_teststat(test, GRETL_STAT_WALD_CHISQ);
model_test_set_dfn(test, 1);
model_test_set_va... | save_breusch_pagan_result | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_chow_test(MODEL *pmod, const char *chowstr, double test, double pval,
int dfn, int dfd, gretlopt opt) {
ModelTestType v7;
ModelTest *mt;
if ((opt & 8) != 0)
v7 = GRETL_TEST_CHOWDUM;
else
v7 = GRETL_TEST_CHOW;
mt = model_test_new(v7);
if (mt) {
if (dfd)
model_... | static void save_chow_test(MODEL *pmod, const char *chowstr, double test,
double pval, int dfn, int dfd, gretlopt opt) {
int ttype = (opt & OPT_D) ? GRETL_TEST_CHOWDUM : GRETL_TEST_CHOW;
ModelTest *mt = model_test_new(ttype);
if (mt != NULL) {
if (dfd == 0) {
model_test_set_t... | save_chow_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_fixed_effects_F(panelmod_t *pan, MODEL *wmod) {
ModelTestType v2;
unsigned char v3;
double v4;
int robust;
ModelTest *test;
robust = pan->opt & 0x20000;
if (fabs(pan->Ffe) <= 1.797693134862316e308) {
v2 = robust ? GRETL_TEST_PANEL_WELCH : GRETL_TEST_PANEL_F;
test = model_test_new(v2);
... | static void save_fixed_effects_F(panelmod_t *pan, MODEL *wmod) {
int robust = (pan->opt & OPT_R);
ModelTest *test;
if (na(pan->Ffe)) {
return;
}
test = model_test_new(robust ? GRETL_TEST_PANEL_WELCH : GRETL_TEST_PANEL_F);
if (test != NULL) {
model_test_set_teststat(test, robust ? GRETL_STAT_WF : ... | save_fixed_effects_F | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_generated_var(parser *p, PRN *prn) {
char *v3;
int v4;
size_t v5;
double *v6;
double *v7;
int rows;
double *v9;
double *v10;
int v11;
double *v12;
double *v13;
int no_decl;
int t;
int ta;
int tb;
int tc;
int td;
int te;
int v;
int s;
GretlType rtype;
GretlType atype_... | static int save_generated_var(parser *p, PRN *prn) {
NODE *r = p->ret;
double **Z = NULL;
double x;
int no_decl = 0;
int t, v = 0;
#if EDEBUG
fprintf(stderr,
"save (%s): lhname='%s'\n callcount=%d\n"
"lh.t=%s, targ=%s, no_decl=%d, r->t=%s\n",
p->lhtree != NULL ? "compound" : ... | save_generated_var | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_hausman_result(panelmod_t *pan) {
double v1;
ModelTest *test;
if (pan->realmod) {
if (fabs(pan->H) <= 1.797693134862316e308) {
if (pan->dfH) {
test = model_test_new(GRETL_TEST_PANEL_HAUSMAN);
if (test) {
model_test_set_teststat(test, 8u);
model_test_set_dfn... | static void save_hausman_result(panelmod_t *pan) {
ModelTest *test;
if (pan->realmod == NULL || na(pan->H) || pan->dfH == 0) {
return;
}
test = model_test_new(GRETL_TEST_PANEL_HAUSMAN);
if (test != NULL) {
model_test_set_teststat(test, GRETL_STAT_WALD_CHISQ);
model_test_set_dfn(test, pan->dfH);... | save_hausman_result | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_obs_markers_to_array(const DATASET *dset, const char *aname) {
char *v2;
int err;
int i;
gretl_array *a;
char *marker;
unsigned long v8;
v8 = __readfsqword(0x28u);
a = 0;
err = 0;
if (gretl_is_series(aname, dset))
err = 37;
else
err = check_identifier(aname);
if (!err)
a = ... | static int save_obs_markers_to_array(const DATASET *dset, const char *aname) {
gretl_array *a = NULL;
int err = 0;
if (gretl_is_series(aname, dset)) {
err = E_TYPES;
} else {
err = check_identifier(aname);
}
if (!err) {
a = gretl_array_new(GRETL_TYPE_STRINGS, dset->n, &err);
}
if (!err) {... | save_obs_markers_to_array | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_obs_markers_to_file(DATASET *dset, const char *fname) {
int err;
int i;
FILE *fp;
fp = gretl_fopen(fname, "w");
err = 0;
if (!fp)
return 11;
for (i = 0; i < dset->n; ++i)
fprintf(fp, off_3237F6, dset->S[i]);
fclose(fp);
return err;
} | static int save_obs_markers_to_file(DATASET *dset, const char *fname) {
FILE *fp = gretl_fopen(fname, "w");
int err = 0;
if (fp == NULL) {
err = E_FOPEN;
} else {
int i;
for (i = 0; i < dset->n; i++) {
fprintf(fp, "%s\n", dset->S[i]);
}
fclose(fp);
}
return err;
} | save_obs_markers_to_file | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_panel_model(MODEL *pmod, panelmod_t *pan, const double **Z,
const DATASET *dset) {
gretlopt opt;
const char *v6;
char *v7;
int err;
int *ulist;
pmod->ci = 93;
if ((pan->opt & 0x20) != 0) {
pmod->opt |= 0x20u;
err = fix_within_stats(pmod, pan);
if (err)
retu... | static int save_panel_model(MODEL *pmod, panelmod_t *pan, const double **Z,
const DATASET *dset) {
int err = 0;
pmod->ci = PANEL;
if (pan->opt & OPT_F) {
int *ulist;
pmod->opt |= OPT_F;
err = fix_within_stats(pmod, pan);
if (err) {
return err;
}
ulist ... | save_panel_model | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_panspec_result(panelmod_t *pan, PRN *prn) {
double *val;
double *v3;
double *v4;
gretl_matrix *tests;
gretl_matrix *pvals;
char **S;
char **S2;
tests = gretl_matrix_alloc(3, 1);
pvals = gretl_matrix_alloc(3, 1);
S = strings_array_new(3);
*tests->val = pan->Ffe;
val = pvals->val;
*va... | static void save_panspec_result(panelmod_t *pan, PRN *prn) {
gretl_matrix *tests = gretl_column_vector_alloc(3);
gretl_matrix *pvals = gretl_column_vector_alloc(3);
char **S = strings_array_new(3);
tests->val[0] = pan->Ffe;
pvals->val[0] = snedecor_cdf_comp(pan->Fdfn, pan->Fdfd, pan->Ffe);
tests->val[1] =... | save_panspec_result | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_pooled_model(MODEL *pmod, panelmod_t *pan, const DATASET *dset) {
gretl_model_set_int(pmod, "pooled", 1);
add_panel_obs_info(pmod, pan);
if ((pan->opt & 1) == 0)
set_model_id(pmod, pan->opt);
if ((pan->opt & 0x20000) != 0) {
panel_robust_vcv(pmod, pan, dset);
pmod->opt |= 0x20000u;
pmo... | static void save_pooled_model(MODEL *pmod, panelmod_t *pan,
const DATASET *dset) {
gretl_model_set_int(pmod, "pooled", 1);
add_panel_obs_info(pmod, pan);
if (!(pan->opt & OPT_A)) {
set_model_id(pmod, pan->opt);
}
if (pan->opt & OPT_R) {
panel_robust_vcv(pmod, pan, dset)... | save_pooled_model | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_restricted_model(ExecState *state, MODEL *pmod, const DATASET *dset,
const gretl_matrix *y, const gretl_matrix *b,
const gretl_matrix *S, const gretl_matrix *u,
double s2, gretl_restriction *rset, PRN *prn) {
int rows;
int cols;
... | static int save_restricted_model(ExecState *state, MODEL *pmod,
const DATASET *dset, const gretl_matrix *y,
const gretl_matrix *b, const gretl_matrix *S,
const gretl_matrix *u, double s2,
... | save_restricted_model | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_scalar_param(parm *p, double **px, int *n) {
double param_scalar;
int err;
int k;
double *tmp;
param_scalar = get_param_scalar(p);
err = 0;
if (fabs(param_scalar) > 1.797693134862316e308)
return 2;
k = *n + 1;
tmp = (double *)realloc(*px, 8LL * k);
if (!tmp)
return 12;
*px = tmp;... | static int save_scalar_param(parm *p, double **px, int *n) {
double x = get_param_scalar(p);
int err = 0;
if (na(x)) {
err = E_DATA;
} else {
double *tmp;
int k = *n + 1;
tmp = realloc(*px, k * sizeof *tmp);
if (tmp == NULL) {
err = E_ALLOC;
} else {
*px = tmp;
tmp[*n... | save_scalar_param | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_var_labels_to_array(const DATASET *dset, const char *aname) {
char *v2;
int err;
int i;
gretl_array *a;
char *vlabel;
unsigned long v8;
v8 = __readfsqword(0x28u);
a = 0;
err = 0;
if (gretl_is_series(aname, dset))
err = 37;
else
err = check_identifier(aname);
if (!err)
a = g... | static int save_var_labels_to_array(const DATASET *dset, const char *aname) {
gretl_array *a = NULL;
int err = 0;
if (gretl_is_series(aname, dset)) {
err = E_TYPES;
} else {
err = check_identifier(aname);
}
if (!err) {
a = gretl_array_new(GRETL_TYPE_STRINGS, dset->v - 1, &err);
}
if (!err... | save_var_labels_to_array | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_var_labels_to_file(const DATASET *dset, const char *fname) {
const char *v2;
int i;
int err;
FILE *fp;
const char *vlabel;
err = 0;
fp = gretl_fopen(fname, "w");
if (!fp)
return 11;
for (i = 1; i < dset->v; ++i) {
vlabel = series_get_label(dset, i);
if (vlabel)
v2 = vlabel;... | int save_var_labels_to_file(const DATASET *dset, const char *fname) {
const char *vlabel;
FILE *fp;
int i, err = 0;
fp = gretl_fopen(fname, "w");
if (fp == NULL) {
err = E_FOPEN;
} else {
for (i = 1; i < dset->v; i++) {
vlabel = series_get_label(dset, i);
fprintf(fp, "%s\n", vlabel == ... | save_var_labels_to_file | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void save_var_vecm(ExecState *s) {
maybe_stack_var(s->var, s->cmd);
if (gretl_in_gui_mode() && s->callback &&
(s->cmd->savename[0] || (s->cmd->opt & 0x400000) != 0))
s->callback(s, s->var, GRETL_OBJ_VAR);
} | static void save_var_vecm(ExecState *s) {
maybe_stack_var(s->var, s->cmd);
if (gretl_in_gui_mode() && s->callback != NULL) {
int havename = *s->cmd->savename != '\0';
int window = (s->cmd->opt & OPT_W) != 0;
if (havename || window) {
s->callback(s, s->var, GRETL_OBJ_VAR);
}
}
} | save_var_vecm | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int save_vector_param(parm *p, gretl_matrix ***pm, int *n) {
gretl_matrix **v3;
int err;
int k;
const gretl_matrix *m;
gretl_matrix **tmp;
m = get_param_vector(p);
err = 0;
if (!m)
return 2;
k = *n + 1;
tmp = (gretl_matrix **)realloc(*pm, 8LL * k);
if (!tmp)
return 12;
*pm = tmp;
v3 =... | static int save_vector_param(parm *p, gretl_matrix ***pm, int *n) {
gretl_matrix *m = get_param_vector(p);
int err = 0;
if (m == NULL) {
err = E_DATA;
} else {
gretl_matrix **tmp;
int k = *n + 1;
tmp = realloc(*pm, k * sizeof *tmp);
if (tmp == NULL) {
err = E_ALLOC;
} else {
... | save_vector_param | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *saved_object_build_matrix(const char *oname, int idx,
const DATASET *dset, int *err) {
gretl_matrix *M;
stacker *smatch;
smatch = find_smatch(oname);
M = 0;
if (smatch) {
if (idx == 90 && smatch->type == 1) {
return mn_logit_probabilities((const... | gretl_matrix *saved_object_build_matrix(const char *oname, int idx,
const DATASET *dset, int *err) {
stacker *smatch = find_smatch(oname);
gretl_matrix *M = NULL;
if (smatch == NULL) {
*err = E_DATA;
} else if (idx == M_MNLPROBS && smatch->type == GRETL_OBJ_EQN) {
... | saved_object_build_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void saved_object_free(stacker *s) {
if (s) {
switch (s->type) {
case 1:
if (!model_is_protected((MODEL *)s->ptr))
gretl_model_free((MODEL *)s->ptr);
break;
case 3:
gretl_VAR_free((GRETL_VAR *)s->ptr);
break;
case 2:
equation_system_destroy((equation_system *)s->p... | static void saved_object_free(stacker *s) {
if (s == NULL) {
return;
}
if (s->type == GRETL_OBJ_EQN) {
if (!model_is_protected(s->ptr)) {
gretl_model_free(s->ptr);
}
} else if (s->type == GRETL_OBJ_VAR) {
gretl_VAR_free(s->ptr);
} else if (s->type == GRETL_OBJ_SYS) {
equation_system... | saved_object_free | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void *saved_object_get_array(const char *oname, int idx, const DATASET *dset,
int *err) {
gretl_array *A;
stacker *smatch;
smatch = find_smatch(oname);
A = 0;
if (smatch) {
if (idx == 97 && smatch->type == 1)
return gretl_model_get_param_names((const MODEL *)smatch->ptr... | void *saved_object_get_array(const char *oname, int idx, const DATASET *dset,
int *err) {
stacker *smatch = find_smatch(oname);
gretl_array *A = NULL;
if (smatch == NULL) {
*err = E_DATA;
} else if (idx == M_PARNAMES && smatch->type == GRETL_OBJ_EQN) {
A = gretl_model_get_p... | saved_object_get_array | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
GretlType saved_object_get_data_type(const char *name, ModelDataIndex idx) {
GretlType ret;
stacker *smatch;
MODEL *pmod;
smatch = find_smatch(name);
ret = GRETL_TYPE_NONE;
if (smatch) {
if (smatch->type == 1) {
if (idx == M_SIGMA) {
return GRETL_TYPE_DOUBLE;
} else {
pmod =... | GretlType saved_object_get_data_type(const char *name, ModelDataIndex idx) {
stacker *smatch = find_smatch(name);
GretlType ret = GRETL_TYPE_NONE;
if (smatch != NULL) {
if (smatch->type == GRETL_OBJ_EQN) {
if (idx == M_SIGMA) {
ret = GRETL_TYPE_DOUBLE;
} else {
MODEL *pmod = smatc... | saved_object_get_data_type | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int *saved_object_get_list(const char *oname, int idx, int *err) {
int *ret;
stacker *smatch;
ret = 0;
smatch = find_smatch(oname);
if (smatch)
return real_get_obj_list(smatch->ptr, (GretlObjType)smatch->type, idx, err);
return ret;
} | int *saved_object_get_list(const char *oname, int idx, int *err) {
int *ret = NULL;
stacker *smatch;
smatch = find_smatch(oname);
if (smatch != NULL) {
ret = real_get_obj_list(smatch->ptr, smatch->type, idx, err);
}
return ret;
} | saved_object_get_list | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gretl_matrix *saved_object_get_matrix(const char *oname, int idx, int *err) {
gretl_matrix *M;
stacker *smatch;
M = 0;
if (idx == 81 || idx == 82) {
M = get_forecast_matrix(idx, err);
} else {
smatch = find_smatch(oname);
if (smatch)
M = real_get_obj_matrix(smatch->ptr, (GretlObjType)smatch... | gretl_matrix *saved_object_get_matrix(const char *oname, int idx, int *err) {
gretl_matrix *M = NULL;
if (idx == M_FCAST || idx == M_FCSE) {
M = get_forecast_matrix(idx, err);
} else {
stacker *smatch = find_smatch(oname);
if (smatch != NULL) {
M = real_get_obj_matrix(smatch->ptr, smatch->type... | saved_object_get_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double saved_object_get_scalar(const char *oname, int idx, DATASET *dset,
int *err) {
double ret;
stacker *smatch;
ret = -999.999;
smatch = find_smatch(oname);
if (smatch)
ret =
real_get_obj_scalar(smatch->ptr, (GretlObjType)smatch->type, dset, idx);
if (ret == -9... | double saved_object_get_scalar(const char *oname, int idx, DATASET *dset,
int *err) {
double ret = INVALID_STAT;
stacker *smatch;
smatch = find_smatch(oname);
if (smatch != NULL) {
ret = real_get_obj_scalar(smatch->ptr, smatch->type, dset, idx);
}
if (ret == INVALID_STA... | saved_object_get_scalar | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int saved_object_get_series(double *x, const char *oname, int idx,
const DATASET *dset) {
stacker *smatch;
if (idx <= 0)
return 2;
smatch = find_smatch(oname);
if (smatch && smatch->type == 1)
return gretl_model_get_series(x, (MODEL *)smatch->ptr, dset,
... | int saved_object_get_series(double *x, const char *oname, int idx,
const DATASET *dset) {
int err = 0;
if (idx <= 0) {
err = E_DATA;
} else {
stacker *smatch = find_smatch(oname);
if (smatch == NULL || smatch->type != GRETL_OBJ_EQN) {
err = E_BADSTAT;
} else {
... | saved_object_get_series | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
char *saved_object_get_string(const char *oname, int idx, const DATASET *dset,
int *err) {
char *ret;
stacker *smatch;
ret = 0;
smatch = find_smatch(oname);
if (smatch)
return real_get_obj_string(smatch->ptr, (GretlObjType)smatch->type, idx,
ds... | char *saved_object_get_string(const char *oname, int idx, const DATASET *dset,
int *err) {
char *ret = NULL;
stacker *smatch;
smatch = find_smatch(oname);
if (smatch != NULL) {
ret = real_get_obj_string(smatch->ptr, smatch->type, idx, dset, err);
}
return ret;
} | saved_object_get_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int savenum(const int *list, int i) {
if (list)
return list[i];
else
return i;
} | static int savenum(const int *list, int i) {
if (list != NULL) {
return list[i];
} else {
return i;
}
} | savenum | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scalar_acceptable(nlspec *s, int i, const char *dername) {
if (i < s->naux)
return 1;
if (i == s->naux)
return s->ci == 78;
return dername && gretl_is_scalar(dername);
} | static int scalar_acceptable(nlspec *s, int i, const char *dername) {
if (i < s->naux) {
return 1;
} else if (i == s->naux) {
return s->ci == MLE;
} else {
return dername != NULL && gretl_is_scalar(dername);
}
} | scalar_acceptable | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *scalar_calc(NODE *x, NODE *y, int f, parser *p) {
NODE *ret;
ret = get_aux_node(p, 54, 0, 0);
if (ret && (p->flags & 2) != 0)
ret->v.xval = xy_calc(x->v.xval, y->v.xval, f, 54, p);
return ret;
} | static NODE *scalar_calc(NODE *x, NODE *y, int f, parser *p) {
NODE *ret = aux_scalar_node(p);
if (ret != NULL && starting(p)) {
ret->v.xval = xy_calc(x->v.xval, y->v.xval, f, NUM, p);
}
return ret;
} | scalar_calc | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scalar_is_read_only_index(const char *name) {
const LOOPSET *loop;
for (loop = currloop; loop; loop = loop->parent) {
if ((loop->type == 2 || loop->type == 3 || loop->type == 5) &&
!strcmp(name, loop->idxname))
return 1;
}
return 0;
} | int scalar_is_read_only_index(const char *name) {
const LOOPSET *loop = currloop;
while (loop != NULL) {
if (indexed_loop(loop) && !strcmp(name, loop->idxname)) {
return 1;
}
loop = loop->parent;
}
return 0;
} | scalar_is_read_only_index | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *scalar_isnan_node(NODE *n, parser *p) {
NODE *ret;
ret = get_aux_node(p, 54, 0, 0);
if (ret) {
node_get_scalar(n, p);
if (!p->err)
ret->v.str = 0;
}
return ret;
} | static NODE *scalar_isnan_node(NODE *n, parser *p) {
NODE *ret = aux_scalar_node(p);
if (ret != NULL) {
double x = node_get_scalar(n, p);
if (!p->err) {
ret->v.xval = isnan(x) != 0;
}
}
return ret;
} | scalar_isnan_node | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double scalar_pdist(int t, int d, const double *parm, int np, double arg,
parser *p) {
int i;
double x;
x = NAN;
for (i = 0; i < np; ++i) {
if (fabs(parm[i]) > 1.797693134862316e308)
return NAN;
}
switch (t) {
case 347:
return gretl_get_pvalue(d, parm, arg);
case 346:
... | static double scalar_pdist(int t, int d, const double *parm, int np, double arg,
parser *p) {
double x = NADBL;
int i;
for (i = 0; i < np; i++) {
if (na(parm[i])) {
return NADBL;
}
}
if (t == F_PVAL) {
x = gretl_get_pvalue(d, parm, arg);
} else if (t == F_PDF) ... | scalar_pdist | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *scalar_postfix_node(NODE *n, parser *p) {
char *vname;
char *v3;
int v4;
NODE *ret;
double x;
ret = get_aux_node(p, 54, 0, 0);
if (ret && (p->flags & 2) != 0) {
if (n->vname && p->lh.name[0] && !strcmp(n->vname, p->lh.name)) {
fwrite("BAD NUM_P/NUM_M\n", 1u, 0x10u, stderr);
vname = ... | static NODE *scalar_postfix_node(NODE *n, parser *p) {
NODE *ret = aux_scalar_node(p);
if (ret != NULL && starting(p)) {
if (n->vname != NULL && p->lh.name[0] != '\0' &&
strcmp(n->vname, p->lh.name) == 0) {
fprintf(stderr, "BAD NUM_P/NUM_M\n");
gretl_errmsg_sprintf(_("The result for %s is ... | scalar_postfix_node | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double *scalar_to_series(NODE *n, parser *p) {
int t;
double *ret;
ret = 0;
if (p->dset && p->dset->n) {
ret = (double *)malloc(8LL * p->dset->n);
if (ret) {
for (t = 0; t < p->dset->n; ++t) {
if (t < p->dset->t1 || t > p->dset->t2)
ret[t] = NAN;
else
ret[t] = ... | static double *scalar_to_series(NODE *n, parser *p) {
double *ret = NULL;
int t;
if (p->dset == NULL || p->dset->n == 0) {
p->err = E_NODATA;
} else {
ret = malloc(p->dset->n * sizeof *ret);
if (ret == NULL) {
p->err = E_ALLOC;
} else {
for (t = 0; t < p->dset->n; t++) {
if ... | scalar_to_series | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
double scalar_xpx(const gretl_matrix *m) {
int i;
double xpx;
xpx = 0.0;
for (i = 0; i < m->rows; ++i)
xpx = m->val[i] * m->val[i] + xpx;
return xpx;
} | static double scalar_xpx(const gretl_matrix *m) {
double xpx = 0.0;
int i;
for (i = 0; i < m->rows; i++) {
xpx += m->val[i] * m->val[i];
}
return xpx;
} | scalar_xpx | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void scaled_convex_combo(gretl_matrix *targ, double w, const gretl_matrix *m1,
const gretl_matrix *m2, double scale) {
int rows;
int i;
double x2;
if (targ) {
if (targ->cols == 1) {
rows = targ->rows;
} else if (targ->rows == 1) {
rows = targ->cols;
} else {
... | static void scaled_convex_combo(gretl_matrix *targ, double w,
const gretl_matrix *m1, const gretl_matrix *m2,
double scale) {
int i, n = gretl_vector_get_length(targ);
double x1, x2;
for (i = 0; i < n; i++) {
x1 = m1->val[i] * scale;
x2 = m2... | scaled_convex_combo | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_arg(const char **psrc, const char **pfmt, const char **pargs,
DATASET *dset, int *ns) {
int flen;
int alen;
int wid;
int supp;
int fc;
int err;
char *arg;
char *targ;
char *fmt;
char *str;
bracket_scan bscan;
unsigned long v20;
v20 = __readfsqword(0x28u);
fmt = 0;
ar... | static int scan_arg(const char **psrc, const char **pfmt, const char **pargs,
DATASET *dset, int *ns) {
char *fmt = NULL;
char *arg = NULL;
char *str = NULL;
char *targ = NULL;
struct bracket_scan bscan;
int flen = 0, alen = 0;
int wid = 0, supp = 0;
int fc = 0;
int err = 0;
#if P... | scan_arg | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_five(BOXPLOT *plot, int *j, const char *s) {
int v3;
int v4;
int nobs;
int nf;
char lq[16];
char uq[24];
unsigned long v10;
v10 = __readfsqword(0x28u);
nobs = 0;
nf = __isoc99_sscanf(s, "%d %lf %15s %15s %lf %d", j, &plot->min, lq, uq,
&plot->max, &nobs);
if (nf > ... | static int scan_five(BOXPLOT *plot, int *j, const char *s) {
char lq[16], uq[16];
int nf, nobs = 0;
nf = sscanf(s, "%d %lf %15s %15s %lf %d", j, &plot->min, lq, uq, &plot->max,
&nobs);
if (nf >= 5) {
if (nf == 6) {
plot->n = nobs;
}
if (is_misscode(lq)) {
plot->lq = NADBL... | scan_five | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_matrix(char *targ, const char **psrc, int rows, int *ns) {
size_t v4;
size_t v6;
int r;
int c;
int c0;
int i;
int j;
int err;
char *endp;
const char *src;
gretl_matrix *m;
double x;
unsigned long v19;
v19 = __readfsqword(0x28u);
src = *psrc;
endp = 0;
m = 0;
r = 0;
c = 0;... | static int scan_matrix(char *targ, const char **psrc, int rows, int *ns) {
const char *src = *psrc;
char *endp = NULL;
gretl_matrix *m = NULL;
double x;
int r = 0, c = 0, c0 = 0;
int i, j, err = 0;
errno = 0;
while (*src) {
strtod(src, &endp);
if (endp == src || errno == ERANGE) {
break;... | scan_matrix | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_scalar(char *targ, const char **psrc, int fc, int width, DATASET *dset,
int *ns) {
int err;
char *endp;
long k;
unsigned long u;
double x;
char *genline;
char *tmp;
unsigned long v18;
v18 = __readfsqword(0x28u);
endp = 0;
k = 0;
u = 0;
x = 0.0;
err = 0;
*__errno_l... | static int scan_scalar(char *targ, const char **psrc, int fc, int width,
DATASET *dset, int *ns) {
char *endp = NULL;
long k = 0;
unsigned long u = 0;
double x = 0;
int err = 0;
errno = 0;
if (fc == 'd') {
k = strtol(*psrc, &endp, 10);
} else if (fc == 'x') {
u = strtoul... | scan_scalar | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_string(char *targ, const char **psrc, int width, bracket_scan *bscan,
int *ns) {
const char *v5;
char *v6;
int n;
int err;
user_var *uvar;
char *conv;
err = 0;
v5 = *psrc;
*psrc = &v5[strspn(*psrc, " \t\n")];
if (bscan->chrs) {
if (bscan->reverse)
n = strcspn(*psr... | static int scan_string(char *targ, const char **psrc, int width,
struct bracket_scan *bscan, int *ns) {
int n, err = 0;
*psrc += strspn(*psrc, " \t\n");
if (bscan->chrs != NULL) {
if (bscan->reverse) {
n = strcspn(*psrc, bscan->chrs);
} else {
n = strspn(*psrc, bscan->... | scan_string | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_to_vector(NODE *n, const char *fmt, const char *arg, int *err) {
int ns;
int nmax;
gretl_matrix *m;
user_var *uvar;
char **S;
unsigned long v11;
v11 = __readfsqword(0x28u);
m = 0;
S = 0;
ns = 0;
nmax = 0;
uvar = get_user_var_of_type_by_name(arg, GRETL_TYPE_MATRIX);
if (uvar) {
if... | static int scan_to_vector(NODE *n, const char *fmt, const char *arg, int *err) {
gretl_matrix *m = NULL;
user_var *uvar = NULL;
char **S = NULL;
int ns = 0;
int nmax = 0;
uvar = get_user_var_of_type_by_name(arg, GRETL_TYPE_MATRIX);
if (uvar == NULL) {
*err = E_INVARG;
return 0;
}
if (gretl_a... | scan_to_vector | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int scan_two(int *j, double *x, const char *s) {
int nf;
char test[24];
unsigned long v6;
v6 = __readfsqword(0x28u);
nf = __isoc99_sscanf(s, "%d %15s", j, test);
if (nf == 2) {
if (!strcmp(test, "?") || !strcmp(test, "NaN"))
*x = NAN;
else
return __isoc99_sscanf(test, "%lf", x) + 1;
}... | static int scan_two(int *j, double *x, const char *s) {
char test[16];
int nf;
nf = sscanf(s, "%d %15s", j, test);
if (nf == 2) {
if (is_misscode(test)) {
*x = NADBL;
} else {
nf--;
nf += sscanf(test, "%lf", x);
}
}
return nf;
} | scan_two | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void scatters_set_timefmt(const DATASET *dset, const double *obs, FILE *fp) {
double v3;
double T;
T = obs[dset->t2] - obs[dset->t1];
fwrite("set xdata time\n", 1u, 0xFu, fp);
fwrite("set timefmt \"%s\"\n", 1u, 0x11u, fp);
if (single_year_sample(dset, dset->t1, dset->t2))
fwrite("set format x \"%m-%d\"... | static void scatters_set_timefmt(const DATASET *dset, const double *obs,
FILE *fp) {
double T = obs[dset->t2] - obs[dset->t1];
int ntics = 6;
fputs("set xdata time\n", fp);
fputs("set timefmt \"%s\"\n", fp);
if (single_year_sample(dset, dset->t1, dset->t2)) {
fputs("set f... | scatters_set_timefmt | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void scatters_time_tics(const double *obs, const DATASET *dset, FILE *fp) {
double v3;
double v4;
double v5;
double v6;
double v7;
int k1_0;
int nmaj;
int T;
double startdate;
double enddate;
startdate = obs[dset->t1];
enddate = obs[dset->t2];
k1_0 = (int)ceil(startdate);
nmaj = (int)floor(... | static void scatters_time_tics(const double *obs, const DATASET *dset,
FILE *fp) {
double startdate = obs[dset->t1];
double enddate = obs[dset->t2];
double obsrange = enddate - startdate;
int k1 = ceil(startdate);
int k2 = floor(enddate);
int nmaj = k2 - k1 + 1;
fputs("set ... | scatters_time_tics | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void schedule_callback(ExecState *s) {
if (s->callback)
s->flags |= 0x20u;
} | static void schedule_callback(ExecState *s) {
if (s->callback != NULL) {
s->flags |= CALLBACK_EXEC;
}
} | schedule_callback | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int screen_bad_aux(const char *line, const DATASET *dset, int *pci) {
char *v3;
int n;
int err;
int ci;
char word[40];
unsigned long v10;
v10 = __readfsqword(0x28u);
n = gretl_namechar_spn(line);
err = 2;
word[0] = 0;
if (n > 0) {
if (n > 31)
n = 31;
strncat(word, line, n);
}
ci... | static int screen_bad_aux(const char *line, const DATASET *dset, int *pci) {
int n = gretl_namechar_spn(line);
char word[FN_NAMELEN];
int ci, err = E_DATA;
*word = '\0';
if (n > 0) {
if (n > FN_NAMELEN - 1) {
n = FN_NAMELEN - 1;
}
strncat(word, line, n);
}
*pci = ci = gretl_command_nu... | screen_bad_aux | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
char *search_dir(char *fname, const char *topdir, int flags) {
char orig[520];
unsigned long v6;
v6 = __readfsqword(0x28u);
strcpy(orig, fname);
if (gretl_path_prepend(fname, topdir))
return 0;
if (!gretl_test_fopen(fname, "r"))
return fname;
if ((flags & 1) != 0) {
if (maybe_add_suffix(fname... | static char *search_dir(char *fname, const char *topdir, int flags) {
char orig[MAXLEN];
int err;
strcpy(orig, fname);
if (gretl_path_prepend(fname, topdir) == 0) {
err = gretl_test_fopen(fname, "r");
if (!err) {
return fname;
}
if (flags & ADD_GDT) {
if (maybe_add_suffix(fname, ".... | search_dir | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
gchar *seas_name_and_label(int k, const DATASET *dset, gretlopt opt,
char *vname) {
int panel_pd;
_BOOL4 v5;
char *v6;
char *v7;
char *v8;
char *v9;
char *v10;
int pd;
char dumstr[8];
char numstr[12];
unsigned long v17;
v17 = __readfsqword(0x28u);
if (dset && dset->... | static gchar *seas_name_and_label(int k, const DATASET *dset, gretlopt opt,
char *vname) {
int pd = dataset_is_panel(dset) ? dset->panel_pd : dset->pd;
int ts = dset->structure == TIME_SERIES || dset->panel_pd > 1;
gchar *ret = NULL;
if (opt & OPT_C) {
sprintf(vname, "S%d"... | seas_name_and_label | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int seasonally_adjust_series(const double *x, double *y, DATASET *dset,
int tramo, int use_log) {
char *v5;
char *v7;
unsigned int v8;
char *v9;
int t1;
int t2;
int err;
int T;
int pdmax;
int save_t1;
int save_t2;
int (*adjust_series)(const double *, double *, const ... | int seasonally_adjust_series(const double *x, double *y, DATASET *dset,
int tramo, int use_log) {
int (*adjust_series)(const double *, double *, const DATASET *, int, int);
int t1 = dset->t1;
int t2 = dset->t2;
int T, err = 0;
if (!quarterly_or_monthly(dset)) {
gretl_errmsg_s... | seasonally_adjust_series | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int *seasonals_list(DATASET *dset, int ref, int center, int *err) {
int *list[2];
list[1] = (int *)__readfsqword(0x28u);
list[0] = 0;
*err = real_seasonals(dset, ref, center, 1, list);
return list[0];
} | int *seasonals_list(DATASET *dset, int ref, int center, int *err) {
int *list = NULL;
*err = real_seasonals(dset, ref, center, 1, &list);
return list;
} | seasonals_list | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *seasonals_node(NODE *l, NODE *r, parser *p) {
int ref;
int center;
NODE *ret;
ret = 0;
if (p->dset && (p->dset->structure == 1 || p->dset->structure == 5) &&
p->dset->pd > 1 ||
p->dset && p->dset->structure == 2 && p->dset->panel_pd > 1) {
ref = 0;
center = 0;
if (l && l->t ... | static NODE *seasonals_node(NODE *l, NODE *r, parser *p) {
NODE *ret = NULL;
if (!dataset_is_seasonal(p->dset) && !dataset_is_seasonal_panel(p->dset)) {
p->err = E_PDWRONG;
} else {
int ref = 0, center = 0;
if (!null_node(l)) {
ref = node_get_int(l, p);
}
if (!null_node(r)) {
cen... | seasonals_node | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int select_subst_method(int n, int nfind) {
if (getenv("REPLACE_USE_BTREE"))
return 1;
if (getenv("REPLACE_NAIVE"))
return 0;
return nfind > 11 && n > 79;
} | static int select_subst_method(int n, int nfind) {
#if 1
if (getenv("REPLACE_USE_BTREE") != NULL) {
return SUBST_BTREE;
} else if (getenv("REPLACE_NAIVE") != NULL) {
return SUBST_SIMPLE;
}
#endif
if (nfind > 11 && n >= 80) {
return SUBST_BTREE;
} else {
return SUBST_SIMPLE;
}
} | select_subst_method | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int separator_wanted(int i, int seppos, char **sepstr, const MODEL *pmod) {
int ret;
int j;
int *seplist;
char *mtl;
ret = 0;
if (i == seppos)
return 1;
if (pmod->ci == 77 && sepstr) {
seplist = gretl_model_get_list(pmod, "seplist");
if (seplist) {
j = in_gretl_list(seplist, i);
i... | static int separator_wanted(int i, int seppos, char **sepstr,
const MODEL *pmod) {
int ret = 0;
if (i == seppos) {
ret = 1;
} else if (pmod->ci == MIDASREG && sepstr != NULL) {
const int *seplist = gretl_model_get_list(pmod, "seplist");
int j = 0;
if (seplist != NULL... | separator_wanted | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void sephton_adf_critvals(adf_info *ainfo, double *c) {
int v2;
int i;
int j;
double X[6];
double coef[16][6];
unsigned long v7;
v7 = __readfsqword(0x28u);
qmemcpy(coef, &unk_31F080, sizeof(coef));
if (4 * (((unsigned int)ainfo->flags >> 4) & 1) + (ainfo->det == UR_TREND))
v2 = 8;
else
v2 =... | static void sephton_adf_critvals(adf_info *ainfo, double *c) {
const double coef[16][6] = {
{-2.5512, 1.084, -720.43, 18279, -175060, 0.3174},
{-2.2186, -3.7919, -333.25, 6665.6, -52297, 0.31557},
{-1.9341, -4.7232, -124.1, 1441.1, -6754.7, 0.0096449},
{-1.6136, -8.9613, 120.77, -3103.9, 243... | sephton_adf_critvals | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int seqval_out_of_bounds(joiner *jr, int seqmax) {
int seqval;
if (jr->seqval >= 0)
seqval = jr->seqval;
else
seqval = -jr->seqval;
return seqmax < seqval;
} | static int seqval_out_of_bounds(joiner *jr, int seqmax) {
if (jr->seqval < 0) {
return -jr->seqval > seqmax;
} else {
return jr->seqval > seqmax;
}
} | seqval_out_of_bounds | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void serialize_coeff_sep(model_data_item *item, PRN *prn) {
CoeffSep *cs_0;
cs_0 = (CoeffSep *)item->ptr;
pprintf(prn, " pos=\"%d\"", cs_0->pos);
if (cs_0->str[0]) {
pputs(prn, " string=\"");
gretl_xml_put_string(cs_0->str, prn);
pputc(prn, 34);
}
pputs(prn, "/>\n");
} | static void serialize_coeff_sep(model_data_item *item, PRN *prn) {
CoeffSep *cs = (CoeffSep *)item->ptr;
pprintf(prn, " pos=\"%d\"", cs->pos);
if (*cs->str != '\0') {
pputs(prn, " string=\"");
gretl_xml_put_string(cs->str, prn);
pputc(prn, '"');
}
pputs(prn, "/>\n");
} | serialize_coeff_sep | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void serialize_model_data_items(const MODEL *pmod, PRN *prn) {
const char *v2;
int i;
int j;
int ja;
int jb;
int jc;
int nelem;
model_data_item *item;
int *list;
cmplx *vals_1;
double x_0;
double x_0a;
double *vals_0;
int *vals;
double x;
pprintf(prn, "<data-items count=\"%d\">\n", pmod... | static void serialize_model_data_items(const MODEL *pmod, PRN *prn) {
model_data_item *item;
int i, j, nelem;
pprintf(prn, "<data-items count=\"%d\">\n", pmod->n_data_items);
for (i = 0; i < pmod->n_data_items; i++) {
item = pmod->data_items[i];
nelem = 0;
pprintf(prn, "<data-item key=\"%s\" type... | serialize_model_data_items | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int serialize_model_tests(const MODEL *pmod, PRN *prn) {
int i;
int n;
n = pmod->ntests;
if (n <= 0 || !pmod->tests)
return 0;
pprintf(prn, "<tests count=\"%d\">\n", pmod->ntests);
for (i = 0; i < n; ++i)
serialize_test(&pmod->tests[i], prn);
pputs(prn, "</tests>\n");
return 0;
} | static int serialize_model_tests(const MODEL *pmod, PRN *prn) {
int i, n = pmod->ntests;
if (n <= 0 || pmod->tests == NULL) {
return 0;
}
pprintf(prn, "<tests count=\"%d\">\n", pmod->ntests);
for (i = 0; i < n; i++) {
serialize_test(&pmod->tests[i], prn);
}
pputs(prn, "</tests>\n");
return ... | serialize_model_tests | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void serialize_scalar_value(double x, PRN *prn) {
if (fabs(x) <= 1.797693134862316e308)
pprintf(prn, "%.16g", x);
else
pprintf(prn, "%g", x);
} | static void serialize_scalar_value(double x, PRN *prn) {
if (na(x)) {
#ifdef WIN32
win32_pprint_nonfinite(prn, x, 0);
#else
pprintf(prn, "%g", x);
#endif
} else {
pprintf(prn, "%.16g", x);
}
} | serialize_scalar_value | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void serialize_test(const ModelTest *src, PRN *prn) {
pprintf(prn, "<test type=\"%d\" ", src->type);
if (src->param && *src->param)
pprintf(prn, "param=\"%s\" ", src->param);
pprintf(prn, "teststat=\"%d\" ", src->teststat);
pprintf(prn, "dfn=\"%d\" ", src->dfn);
pprintf(prn, "dfd=\"%g\" ", src->dfd);
pp... | static void serialize_test(const ModelTest *src, PRN *prn) {
pprintf(prn, "<test type=\"%d\" ", src->type);
if (src->param != NULL && *src->param != '\0') {
pprintf(prn, "param=\"%s\" ", src->param);
}
pprintf(prn, "teststat=\"%d\" ", (int)src->teststat);
pprintf(prn, "dfn=\"%d\" ", src->dfn);
pprintf... | serialize_test | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int serialize_user_vars(const char *dirname) {
int errp;
int i;
int err;
int n;
GretlType type;
int ni;
const char *typestr;
void (*write_func)(...);
PRN *prn;
char path[520];
unsigned long v12;
v12 = __readfsqword(0x28u);
err = 0;
n = 4;
gretl_push_c_numeric_locale();
for (i = 0; i < n... | int serialize_user_vars(const char *dirname) {
GretlType type;
const char *typestr;
void (*write_func)();
char path[MAXLEN];
PRN *prn;
int i, n, ni;
int err = 0;
n = sizeof uvar_files / sizeof uvar_files[0];
gretl_push_c_numeric_locale();
for (i = 0; i < n; i++) {
type = uvar_files[i].type;
... | serialize_user_vars | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void serialize_vcv_info(model_data_item *item, PRN *prn) {
VCVInfo *vi;
vi = (VCVInfo *)item->ptr;
pprintf(prn, " vmaj=\"%d\"", vi->vmaj);
pprintf(prn, " vmin=\"%d\"", vi->vmin);
if (vi->order > 0)
pprintf(prn, " order=\"%d\"", vi->order);
if (vi->flags)
pprintf(prn, " flags=\"%d\"", vi->flags);
... | static void serialize_vcv_info(model_data_item *item, PRN *prn) {
VCVInfo *vi = (VCVInfo *)item->ptr;
pprintf(prn, " vmaj=\"%d\"", vi->vmaj);
pprintf(prn, " vmin=\"%d\"", vi->vmin);
if (vi->order > 0) {
pprintf(prn, " order=\"%d\"", vi->order);
}
if (vi->flags > 0) {
pprintf(prn, " flags=\"%d\"", v... | serialize_vcv_info | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
NODE *series_2_func(NODE *l, NODE *r, int f, parser *p) {
int v4;
int v5;
int v6;
int v7;
int n;
int na;
NODE *ret;
val *x;
val *y;
if ((p->flags & 2) == 0)
return get_aux_node(p, 0, 0, 0);
x = 0;
y = 0;
n = 0;
if (!p->err) {
switch (l->t) {
case '7':
if (p->dset)
... | static NODE *series_2_func(NODE *l, NODE *r, int f, parser *p) {
NODE *ret = NULL;
if (starting(p)) {
const double *x = NULL, *y = NULL;
int n = 0, n2 = 0;
if (!p->err) {
if (l->t == SERIES) {
n = sample_size(p->dset);
x = l->v.xvec + p->dset->t1;
} else if (l->t == NUM) {
... | series_2_func | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
int series_adjust_sample(const double *x, int *t1, int *t2) {
int t;
int ta;
int tb;
int t1min;
int t2max;
int err;
t1min = *t1;
t2max = *t2;
err = 0;
for (t = *t1; t < t2max && fabs(x[t]) > 1.797693134862316e308; ++t)
++t1min;
for (ta = *t2; ta > t1min && fabs(x[ta]) > 1.797693134862316e308;... | int series_adjust_sample(const double *x, int *t1, int *t2) {
int t, t1min = *t1, t2max = *t2;
int err = 0;
for (t = t1min; t < t2max; t++) {
if (na(x[t]))
t1min++;
else
break;
}
for (t = t2max; t > t1min; t--) {
if (na(x[t]))
t2max--;
else
break;
}
for (t = t1mi... | series_adjust_sample | gretl-2021d | sci-mathematics | O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0 | ida | O0 |
void series_attach_string_table(DATASET *dset, int i, series_table *st) {
if (dset && i > 0 && i < dset->v) {
series_set_discrete(dset, i, 1);
dset->varinfo[i]->st = st;
}
} | void series_attach_string_table(DATASET *dset, int i, series_table *st) {
if (dset != NULL && i > 0 && i < dset->v) {
series_set_discrete(dset, i, 1);
dset->varinfo[i]->st = st;
}
} | series_attach_string_table | 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.