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 new_package_info_from_spec(fnpkg *pkg, const char *fname, FILE *fp, gretlopt opt, PRN *prn) { size_t v5; size_t v6; int err; int got; int i; int quiet; int pdfdoc; const char *okstr; const char *failed; gchar *currdir; gchar *hstr; char *p; const char *key; ...
static int new_package_info_from_spec(fnpkg *pkg, const char *fname, FILE *fp, gretlopt opt, PRN *prn) { const char *okstr, *failed; gchar *currdir = NULL; int quiet = (opt & OPT_Q); char *p, line[1024]; int got = 0; int err = 0; if (opt & OPT_G) { okstr = "<@ok...
new_package_info_from_spec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
fnpkg *new_pkg_from_spec_file(const char *gfnname, gretlopt opt, PRN *prn, int *err) { int npub; int npriv; int offset; int i; int quiet; char **privnames; fnpkg *pkg; char **pubnames; FILE *fp; ufunc *uf; char cont[1024]; char fname[4096]; char line[4104]; unsi...
static fnpkg *new_pkg_from_spec_file(const char *gfnname, gretlopt opt, PRN *prn, int *err) { fnpkg *pkg = NULL; char fname[FILENAME_MAX]; char line[4096], cont[1024]; int quiet = (opt & OPT_Q); FILE *fp; if (!has_suffix(gfnname, ".gfn")) { gretl_errmsg_set("Output ...
new_pkg_from_spec_file
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void new_trim_to_length(char *s, int len) { int i; _BOOL4 quoted; int bp0; int bp1; int n; n = strlen(s); if (n > len) { quoted = 0; bp0 = 0; bp1 = 0; for (i = 1; i < n - 1; ++i) { if (s[i] == 34 && s[i - 1] != 92) quoted = !quoted; if (!quoted && s[i] == 32) { ...
static void new_trim_to_length(char *s, int len) { int n = strlen(s); if (n > len) { int i, quoted = 0; int bp0 = 0, bp1 = 0; for (i = 1; i < n - 1; i++) { if (s[i] == '"' && s[i - 1] != '\\') { quoted = !quoted; } if (!quoted && s[i] == ' ') { if (i < len) { ...
new_trim_to_length
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
xtimer *new_xtimer(int level) { xtimer *xt; xt = (xtimer *)g_malloc(16); xt->level = level; xt->t0 = get_xtime(); g_ptr_array_insert(xtimers, xtimers->len, xt); return xt; }
static struct xtimer *new_xtimer(int level) { struct xtimer *xt = g_malloc(sizeof *xt); xt->level = level; xt->t0 = get_xtime(); g_ptr_array_insert(xtimers, xtimers->len, xt); return xt; }
new_xtimer
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newarray(int flags) { NODE *n; n = new_node(59); if (n) { n->flags = flags; n->v.str = 0; } return n; }
static NODE *newarray(int flags) { NODE *n = new_node(ARRAY); if (n != NULL) { n->flags = flags; n->v.a = NULL; } return n; }
newarray
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newb1(int t, NODE *b) { NODE *n; n = new_node(t); if (n) n->L = b; return n; }
static NODE *newb1(int t, NODE *b) { NODE *n = new_node(t); if (n != NULL) { n->L = b; } return n; }
newb1
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newb2(int t, NODE *l, NODE *r) { NODE *n; n = new_node(t); if (n) { n->L = l; n->R = r; } return n; }
NODE *newb2(int t, NODE *l, NODE *r) { NODE *n = new_node(t); if (n != NULL) { n->L = l; n->R = r; } return n; }
newb2
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newb3(int t, NODE *l) { NODE *n; n = new_node(t); if (n) n->L = l; return n; }
static NODE *newb3(int t, NODE *l) { NODE *n = new_node(t); if (n != NULL) { n->L = l; } return n; }
newb3
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newbn(int t) { NODE *n; n = new_node(t); if (n) { n->v.bn.n_nodes = 0; n->v.bn.n = 0; } return n; }
static NODE *newbn(int t) { NODE *n = new_node(t); if (n != NULL) { n->v.bn.n_nodes = 0; n->v.bn.n = NULL; } return n; }
newbn
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newbundle(int flags) { NODE *n; n = new_node(58); if (n) { n->flags = flags; n->v.str = 0; } return n; }
static NODE *newbundle(int flags) { NODE *n = new_node(BUNDLE); if (n != NULL) { n->flags = flags; n->v.b = NULL; } return n; }
newbundle
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newdbl(double x) { NODE *n; n = new_node(54); if (n) n->v.xval = x; return n; }
NODE *newdbl(double x) { NODE *n = new_node(NUM); if (n != NULL) { n->v.xval = x; } return n; }
newdbl
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newempty() { NODE *n; n = new_node(85); if (n) n->v.bn.n_nodes = 0; return n; }
NODE *newempty(void) { NODE *n = new_node(EMPTY); if (n != NULL) { n->v.idnum = 0; } return n; }
newempty
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *newey_west_H(const gretl_matrix *X, const gretl_matrix *u, gretl_matrix **pw, int *err) { _BOOL4 v5; int make_w; int j; int t; int ta; int T; int k; gretl_matrix *H; double x0; double xtj; x0 = *X->val; T = X->rows; k = X->cols; if (u) H = gretl_...
static gretl_matrix *newey_west_H(const gretl_matrix *X, const gretl_matrix *u, gretl_matrix **pw, int *err) { gretl_matrix *H; double x0 = X->val[0]; int T = X->rows; int k = X->cols; int make_w; int j, t; if (u == NULL) { H = gretl_matrix_copy(X); } else { H ...
newey_west_H
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *newey_west_OPG(const gretl_matrix *G, int *err) { return HAC_XOX(G, 0, 0, 0, err); }
gretl_matrix *newey_west_OPG(const gretl_matrix *G, int *err) { return HAC_XOX(G, NULL, NULL, 0, err); }
newey_west_OPG
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int newey_west_bandwidth(const gretl_matrix *H, const gretl_matrix *w, int kern, int prewhitened, int *m, double *b) { double v6; double v7; int v8; double v9; double v11; int i; int ia; int j; int t; int ta; int T; int k; int n; double sigma; double sigmaa; doub...
int newey_west_bandwidth(const gretl_matrix *H, const gretl_matrix *w, int kern, int prewhitened, int *m, double *b) { const double cg[] = {1.1447, 2.6614, 1.3221}; double sigma; double htw0, htwj, wi; double s1, s0, g, p; int T = H->rows; int k = H->cols; int n, i, j, t; int e...
newey_west_bandwidth
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newivec(int n) { NODE *b; b = new_node(90); if (b) { b->flags = 2; if (n <= 0) { b->v.str = 0; } else { b->v.str = (char *)malloc(4LL * n); if (!b->v.str) { free(b); return 0; } } } return b; }
static NODE *newivec(int n) { NODE *b = new_node(IVEC); if (b != NULL) { b->flags = TMP_NODE; if (n > 0) { b->v.ivec = malloc(n * sizeof(int)); if (b->v.ivec == NULL) { free(b); b = NULL; } } else { b->v.ivec = NULL; } } return b; }
newivec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newlist(int flags) { NODE *n; n = new_node(56); if (n) { n->flags = flags; n->v.str = 0; } return n; }
static NODE *newlist(int flags) { NODE *n = new_node(LIST); if (n != NULL) { n->flags = flags; n->v.ivec = NULL; } return n; }
newlist
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newmat(int flags) { NODE *n; n = new_node(57); if (n) { n->flags = flags; n->v.str = 0; } return n; }
static NODE *newmat(int flags) { NODE *n = new_node(MAT); if (n != NULL) { n->flags = flags; n->v.m = NULL; } return n; }
newmat
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newmdef(int k) { int i; NODE *n; n = new_node(74); if (n) { if (k <= 0) { n->v.bn.n = 0; } else { n->v.bn.n = (NODE **)malloc(8LL * k); if (n->v.bn.n) { for (i = 0; i < k; ++i) n->v.bn.n[i] = 0; } else { free(n); n = 0; } } i...
static NODE *newmdef(int k) { NODE *n = new_node(MDEF); if (n != NULL) { int i; if (k > 0) { n->v.bn.n = malloc(k * sizeof n); if (n->v.bn.n != NULL) { for (i = 0; i < k; i++) { n->v.bn.n[i] = NULL; } } else { free(n); n = NULL; } } els...
newmdef
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newmspec() { NODE *n; n = new_node(72); if (n) { n->flags = 2; n->v.str = 0; } return n; }
static NODE *newmspec(void) { NODE *n = new_node(MSPEC); if (n != NULL) { n->flags = TMP_NODE; n->v.mspec = NULL; } return n; }
newmspec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newref(parser *p, int t) { NODE *n; user_var *u_1; user_var *u_0; user_var *u; n = new_node(t); if (n) { switch (t) { case '7': n->vnum = p->idnum; n->v.str = (char *)p->dset->Z[n->vnum]; n->vname = p->idstr; if (is_string_valued(p->dset, n->vnum)) n->flags |= ...
static NODE *newref(parser *p, int t) { NODE *n = new_node(t); if (n != NULL) { if (t == SERIES) { n->vnum = p->idnum; n->v.xvec = p->dset->Z[n->vnum]; n->vname = p->idstr; if (is_string_valued(p->dset, n->vnum)) { n->flags |= SVL_NODE; } } else if (t == NUM || t == NU...
newref
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newseries(int n, int flags) { NODE *b; b = new_node(55); if (b) { b->flags = flags; if (n <= 0) { b->v.str = 0; } else { b->v.str = (char *)na_array(n); if (!b->v.str) { free(b); return 0; } } } return b; }
static NODE *newseries(int n, int flags) { NODE *b = new_node(SERIES); if (b != NULL) { b->flags = flags; if (n > 0) { b->v.xvec = na_array(n); if (b->v.xvec == NULL) { free(b); b = NULL; } } else { b->v.xvec = NULL; } } return b; }
newseries
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newstr(char *s) { NODE *n; n = 0; if (s) { n = new_node(60); if (n) { n->v.str = s; n->flags = 2; } } else { fwrite("newstr: input is NULL\n", 1u, 0x16u, stderr); } return n; }
static NODE *newstr(char *s) { NODE *n = NULL; if (s == NULL) { fprintf(stderr, "newstr: input is NULL\n"); } else { n = new_node(STR); if (n != NULL) { n->v.str = s; n->flags = TMP_NODE; } } return n; }
newstr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
NODE *newstring(int flags) { NODE *n; n = new_node(60); if (n) { n->flags = flags; n->v.str = 0; } return n; }
static NODE *newstring(int flags) { NODE *n = new_node(STR); if (n != NULL) { n->flags = flags; n->v.str = NULL; } return n; }
newstring
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int newton_raphson_max(double *b, int n, int maxit, double crittol, double gradtol, int *itercount, int crittype, BFGS_CRIT_FUNC cfunc, BFGS_GRAD_FUNC gradfunc, HESS_FUNC hessfunc, void *data, gretlopt opt, PRN *prn) { char *v14; const char *v15; ...
int newton_raphson_max(double *b, int n, int maxit, double crittol, double gradtol, int *itercount, int crittype, BFGS_CRIT_FUNC cfunc, BFGS_GRAD_FUNC gradfunc, HESS_FUNC hessfunc, void *data, gretlopt opt, PRN *prn) { BFGS_GRAD_FUNC realgrad = NULL...
newton_raphson_max
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
uint32_t nextA(_org_state *org, int w) { return (1 << (w - 1)) | ((unsigned int)(-1 << (32 - w)) >> (32 - w)) & _genrand_dc(org); }
static uint32_t nextA(_org_state *org, int w) { uint32_t x, word_mask; word_mask = 0xFFFFFFFF; word_mask <<= WORDLEN - w; word_mask >>= WORDLEN - w; x = _genrand_dc(org); x &= word_mask; x |= (LSB << (w - 1)); return x; }
nextA
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
uint32_t nextA_id(_org_state *org, int w, int id, int idw) { return id | (1 << (w - 1)) | ((unsigned int)(-1 << (32 - w)) >> (32 - w) >> idw << idw) & _genrand_dc(org); }
static uint32_t nextA_id(_org_state *org, int w, int id, int idw) { uint32_t x, word_mask; word_mask = 0xFFFFFFFF; word_mask <<= WORDLEN - w; word_mask >>= WORDLEN - w; word_mask >>= idw; word_mask <<= idw; x = _genrand_dc(org); x &= word_mask; x |= (LSB << (w - 1)); x |= (uint32_t)id; return x...
nextA_id
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int next_arg_is_string(int i, const int *callargs, int k, int opt) { if (callargs && callargs[i]) return 1; if ((opt & 2) != 0 && i > 0 && i < k - 1) return 1; return (opt & 1) != 0 && i == k - 1; }
static int next_arg_is_string(int i, const int *callargs, int k, int opt) { if (callargs && callargs[i]) { return 1; } if ((opt & MID_STR) && i > 0 && i < k - 1) { return 1; } if ((opt & RIGHT_STR) && i == k - 1) { return 1; } return 0; }
next_arg_is_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *next_available_function_name(fnpkg *pkg, int *idxp) { int v3; ufunc *ret; ufunc *fun; ret = 0; if (n_ufuns) { while (fname_idx < n_ufuns) { v3 = fname_idx++; fun = ufuns[v3]; if (!fun->pkg || pkg == fun->pkg) { ret = ufuns[v3]; *idxp = fname_idx - 1; ...
const char *next_available_function_name(fnpkg *pkg, int *idxp) { const char *ret = NULL; ufunc *fun; if (n_ufuns == 0) { fname_idx = 0; return NULL; } while (fname_idx < n_ufuns) { fun = ufuns[fname_idx++]; if (fun->pkg == NULL || fun->pkg == pkg) { ret = fun->name; *idxp = fnam...
next_available_function_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int next_ok_obs(const double *y, int i) { int ia; for (ia = i + 1; fabs(y[ia]) > 1.797693134862316e308; ++ia) ; return ia; }
static int next_ok_obs(const double *y, int i) { i++; while (na(y[i])) i++; return i; }
next_ok_obs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void next_state(eqdeg_t *eq, Vector *v, int *count) { uint32_t v3; uint32_t v4; uint32_t tmp; uint32_t tmpa; do { tmp = eq->gupper_mask & v->cf[v->start] | v->cf[(v->start + 1) % eq->nnn] & eq->glower_mask; v3 = v->cf[(eq->mmm + v->start) % eq->nnn]; v->cf[v->start] = eq->aaa[lsb(eq, tm...
static void next_state(eqdeg_t *eq, Vector *v, int *count) { uint32_t tmp; do { tmp = (v->cf[v->start] & eq->gupper_mask) | (v->cf[(v->start + 1) % eq->nnn] & eq->glower_mask); v->cf[v->start] = v->cf[(v->start + eq->mmm) % eq->nnn] ^ ((tmp >> 1) ^ eq->aaa[lsb(eq, tmp)]); ...
next_state
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_calculate_fvec(nlspec *s) { return nls_auto_genr(s, 0); }
int nl_calculate_fvec(nlspec *s) { return nls_auto_genr(s, 0); }
nl_calculate_fvec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_coeff_check(nlspec *s) { int i; for (i = 0; i < s->ncoeff; ++i) { if (fabs(s->coeff[i]) > 1.797693134862316e308) { gretl_errmsg_set("Unitialized parameter"); return 2; } } return 0; }
static int nl_coeff_check(nlspec *s) { int i; for (i = 0; i < s->ncoeff; i++) { if (na(s->coeff[i])) { gretl_errmsg_set("Unitialized parameter"); return E_DATA; } } return 0; }
nl_coeff_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_function_calc(double *f, double *x, void *p) { double v4; int t; int err; const double *y; err = nl_calculate_fvec((nlspec *)p); if (err) return err; *((_QWORD *)p + 22) = 0; if (*((_QWORD *)p + 13)) y = *(const double **)(*((_QWORD *)p + 13) + 8LL); else y = (const double *)(*(_QW...
static int nl_function_calc(double *f, double *x, void *p) { nlspec *s = (nlspec *)p; const double *y; int t, err = 0; #if NLS_DEBUG > 1 fprintf(stderr, "\n*** nl_function_calc called\n"); #endif err = nl_calculate_fvec(s); if (err) { return err; } s->crit = 0.0; if (s->lvec != NULL) { y =...
nl_function_calc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_missval_check(nlspec *s, const DATASET *dset) { int t1; int t2; int t; int err; int v; t1 = s->t1; t2 = s->t2; err = nl_calculate_fvec(s); if (err) return err; if (!s->lvec && s->lhtype != 6) { v = s->lhv; for (t1 = s->t1; t1 <= s->t2 && fabs(s->dset->Z[v][t1]) > 1.79769...
static int nl_missval_check(nlspec *s, const DATASET *dset) { int t1 = s->t1, t2 = s->t2; int t, v; int err = 0; #if NLS_DEBUG fprintf(stderr, "nl_missval_check: calling nl_calculate_fvec\n"); #endif err = nl_calculate_fvec(s); if (err) { return err; } if (s->lvec != NULL || s->lhtype == GRETL_TY...
nl_missval_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
MODEL *nl_model(MODEL *__return_ptr retstr, DATASET *dset, gretlopt opt, PRN *prn) { real_nl_model(retstr, 0, dset, opt, prn); return retstr; }
MODEL nl_model(DATASET *dset, gretlopt opt, PRN *prn) { return real_nl_model(NULL, dset, opt, prn); }
nl_model
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_model_add_spec_info(MODEL *pmod, nlspec *spec) { int err; int i; const char *cmd; PRN *prn; char *buf; unsigned long v8; v8 = __readfsqword(0x28u); cmd = gretl_command_word(spec->ci); err = 0; prn = gretl_print_new(GRETL_PRINT_BUFFER, &err); if (err) return err; pputs(prn, cmd); if...
static int nl_model_add_spec_info(MODEL *pmod, nlspec *spec) { const char *cmd = gretl_command_word(spec->ci); PRN *prn; char *buf; int i, err = 0; prn = gretl_print_new(GRETL_PRINT_BUFFER, &err); if (err) { return err; } pputs(prn, cmd); if (pmod->depvar != NULL) { pprintf(prn, " %s\n", pm...
nl_model_add_spec_info
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_model_allocate(MODEL *pmod, nlspec *spec) { int k; k = spec->ncoeff; if ((spec->opt & 1) != 0) { pmod->vcv = 0; pmod->coeff = (double *)malloc(8LL * k); pmod->sderr = (double *)malloc(8LL * k); if (!pmod->coeff || !pmod->sderr) pmod->errcode = 12; } else { pmod->coeff = (double...
static int nl_model_allocate(MODEL *pmod, nlspec *spec) { int k = spec->ncoeff; if (spec->opt & OPT_A) { pmod->vcv = NULL; pmod->coeff = malloc(k * sizeof *pmod->coeff); pmod->sderr = malloc(k * sizeof *pmod->sderr); if (pmod->coeff == NULL || pmod->sderr == NULL) { pmod->errcode = E_ALLOC; ...
nl_model_allocate
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_model_run_aux_genrs(const MODEL *pmod, DATASET *dset) { int i; int j; int err; int n_aux; const char *buf; char line[520]; unsigned long v9; v9 = __readfsqword(0x28u); err = 0; n_aux = gretl_model_get_int(pmod, "nl_naux"); if (!n_aux) return 0; buf = (const char *)gretl_model_get_dat...
int nl_model_run_aux_genrs(const MODEL *pmod, DATASET *dset) { char line[MAXLEN]; const char *buf; int i, j, n_aux = 0; int err = 0; n_aux = gretl_model_get_int(pmod, "nl_naux"); if (n_aux == 0) { return 0; } buf = gretl_model_get_data(pmod, "nlinfo"); if (buf == NULL) { return E_DATA; } ...
nl_model_run_aux_genrs
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_parse_line(int ci, const char *line, const DATASET *dset, PRN *prn) { char *v4; char *v5; char *v6; int err; err = 0; private_spec.ci = ci; if (!strncmp(line, "nls ", 4u) || !strncmp(line, "mle ", 4u) || !strncmp(line, "gmm ", 4u) || !strcmp(line, "gmm")) { if (private_spec.nlfunc) ...
int nl_parse_line(int ci, const char *line, const DATASET *dset, PRN *prn) { nlspec *s = &private_spec; int err = 0; s->ci = ci; #if NLS_DEBUG fprintf(stderr, "nls_parse_line: '%s'\n", line); #endif if (cmd_start(line)) { if (s->nlfunc != NULL) { clear_nlspec(s); } err = nlspec_set_regres...
nl_parse_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nl_set_smallstep() { if (!private_spec.nlfunc) return 2; private_spec.flags |= 0x10u; return 0; }
int nl_set_smallstep(void) { if (private_spec.nlfunc != NULL) { private_spec.flags |= NL_SMALLSTEP; return 0; } else { return E_DATA; } }
nl_set_smallstep
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_auto_genr(nlspec *s, int i) { int j; int ja; gretl_matrix *m; s->generr = 0; if (s->genrs) { for (j = 0; j < s->naux; ++j) { s->generr = execute_genr(s->genrs[j], s->dset, s->prn); if (s->generr) return s->generr; } if (i || s->nlfunc) { ja = s->naux + i; s...
static int nls_auto_genr(nlspec *s, int i) { int j; s->generr = 0; #if NLS_DEBUG fprintf(stderr, "nls_auto_genr: input i = %d\n", i); #endif if (s->genrs == NULL) { #if NLS_DEBUG fprintf(stderr, " calling nls_genr_setup\n"); #endif s->generr = nls_genr_setup(s); if (s->generr) { fprintf(std...
nls_auto_genr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_boot_calc(const MODEL *pmod, DATASET *dset, int ft1, int ft2, double *fcerr) { gretl_matrix *v6; int rows; int nx; int nm; int err; int i; int ix; int im; int s; int t; int k; int origv; int yno; int iters; int fT; int len; gretl_matrix **msave; double *xsav...
int nls_boot_calc(const MODEL *pmod, DATASET *dset, int ft1, int ft2, double *fcerr) { nlspec *spec; gretl_matrix *fcmat = NULL; gretl_matrix **msave = NULL; double *orig_y = NULL; double *xsave = NULL; double *resu = NULL; int origv = dset->v; int yno = pmod->list[1]; int iters = 10...
nls_boot_calc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_calc(int m, int n, double *x, double *fvec, double *jac, int ldjac, int *iflag, void *p) { int err; int erra; update_coeff_values(x, (nlspec *)p); if (*iflag == 1) { err = nl_function_calc(fvec, x, p); if (err) { fprintf(stderr, "nl_function_calc: err = %d\n", err); *if...
static int nls_calc(int m, int n, double *x, double *fvec, double *jac, int ldjac, int *iflag, void *p) { nlspec *s = (nlspec *)p; int err; #if NLS_DEBUG fprintf(stderr, "nls_calc called by minpack with iflag = %d\n", (int)*iflag); #endif update_coeff_values(x, s); if (*iflag == 1) { ...
nls_calc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_calc_approx(int m, int n, double *x, double *fvec, int *iflag, void *p) { const char *v6; int err; int erru; erru = update_coeff_values(x, (nlspec *)p); err = erru; if (!erru) err = nl_function_calc(fvec, x, p); if (err) { if (erru) v6 = "update_coeff_values"; ...
static int nls_calc_approx(int m, int n, double *x, double *fvec, int *iflag, void *p) { int erru, errc, err; err = erru = update_coeff_values(x, p); if (!err) { err = errc = nl_function_calc(fvec, x, p); } if (err) { fprintf(stderr, "nls_calc_approx: got error %d from %...
nls_calc_approx
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_calculate_deriv(nlspec *s, int i) { return nls_auto_genr(s, i + 1); }
static int nls_calculate_deriv(nlspec *s, int i) { return nls_auto_genr(s, i + 1); }
nls_calculate_deriv
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_dynamic_check(nlspec *s, char *formula) { int err; int T; int v; double *y; GENERATOR *genr; unsigned long v8; v8 = __readfsqword(0x28u); T = s->dset->n; v = s->dv; err = 0; y = copyvec(s->dset->Z[v], T); if (!y) return 12; strcpy(formula, s->nlfunc); adjust_saved_nlfunc(formula...
static int nls_dynamic_check(nlspec *s, char *formula) { GENERATOR *genr; double *y; int T = s->dset->n; int v = s->dv; int err = 0; y = copyvec(s->dset->Z[v], T); if (y == NULL) { return E_ALLOC; } strcpy(formula, s->nlfunc); adjust_saved_nlfunc(formula); genr = genr_compile(formula, s->ds...
nls_dynamic_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_fcast(Forecast *fc, const MODEL *pmod, DATASET *dset) { int t2; int yno; int t; int ta; int tb; int err; int oldt1; int oldt2; int origv; int fcv; double *y; const char *nlfunc; char formula[65544]; unsigned long v18; v18 = __readfsqword(0x28u); oldt1 = dset->t1; oldt2 = dset-...
static int nls_fcast(Forecast *fc, const MODEL *pmod, DATASET *dset) { int oldt1 = dset->t1; int oldt2 = dset->t2; int origv = dset->v; int yno = 0; const char *nlfunc; double *y = NULL; char formula[MAXLINE]; int t, err = 0; nlfunc = gretl_model_get_data(pmod, "nl_regfunc"); if (nlfunc == NULL) { ...
nls_fcast
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nls_genr_setup(nlspec *s) { parm *params; GENERATOR **v3; char *v4; int err; int i; int j; int v; gretlopt genopt; GretlType gentype; GretlType result; gretl_matrix *m; char *dname; char formula[65544]; unsigned long v15; v15 = __readfsqword(0x28u); err = allocate_generators(s); i...
static int nls_genr_setup(nlspec *s) { char formula[MAXLINE]; gretl_matrix *m; int i, j, v; int err = 0; err = allocate_generators(s); if (err) { return err; } #if NLS_DEBUG > 1 PRN *eprn = gretl_print_new(GRETL_PRINT_STDERR, NULL); if (eprn != NULL) { printdata(NULL, NULL, s->dset, OPT_O, ...
nls_genr_setup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nls_robust_failed_line(PRN *prn) { char *v1; if (plain_format(prn)) { v1 = gettext("Could not compute robust standard errors"); pputs(prn, v1); pputc(prn, 10); } }
static void nls_robust_failed_line(PRN *prn) { if (plain_format(prn)) { pputs(prn, _("Could not compute robust standard errors")); pputc(prn, '\n'); } }
nls_robust_failed_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nls_run_GNR(MODEL *pmod, nlspec *spec, PRN *prn) { MODEL *v3; int v4; MODEL v5; PRN *prna; nlspec *speca; MODEL *pmoda; int perfect; int err; int *glist; DATASET *gdset; unsigned long v13; pmoda = pmod; speca = spec; prna = prn; v13 = __readfsqword(0x28u); gdset = 0; glist = 0; ...
static void nls_run_GNR(MODEL *pmod, nlspec *spec, PRN *prn) { DATASET *gdset = NULL; int *glist = NULL; int perfect = 0; int err = 0; gdset = make_GNR_dataset(spec, spec->dset, &glist, &perfect, prn, &err); if (err) { pmod->errcode = err; } else { *pmod = GNR(glist, gdset, spec->opt, prn); ...
nls_run_GNR
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_aux(nlspec *spec, const char *s, const DATASET *dset) { int ci; int err; gchar *tmp; unsigned long v7; v7 = __readfsqword(0x28u); err = screen_bad_aux(s, dset, &ci); if (!err) { if (ci == 101) { tmp = revise_aux_printf(s); if (tmp) { err = strings_array_add(&spec->a...
int nlspec_add_aux(nlspec *spec, const char *s, const DATASET *dset) { int ci, err; #if NLS_DEBUG fprintf(stderr, "nlspec_add_aux: s = '%s'\n", s); #endif err = screen_bad_aux(s, dset, &ci); if (!err) { if (ci == PRINTF) { gchar *tmp = revise_aux_printf(s); if (tmp != NULL) { err = st...
nlspec_add_aux
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_hessian(nlspec *spec, const char *hesscall) { int err; if (spec->ci != 78) return 37; if (spec->hname[0]) return 2; err = optimizer_get_matrix_name(hesscall, spec->hname); if (!err) { spec->hesscall = gretl_strdup(hesscall); if (!spec->hesscall) return 12; } return er...
static int nlspec_add_hessian(nlspec *spec, const char *hesscall) { int err; if (spec->ci != MLE) { return E_TYPES; } if (*spec->hname != '\0') { return E_DATA; } err = optimizer_get_matrix_name(hesscall, spec->hname); if (!err) { spec->hesscall = gretl_strdup(hesscall); if (spec->he...
nlspec_add_hessian
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_ivreg_oc(nlspec *s, int lhv, const int *rlist, const double **Z) { int i; int t; int ta; int err; int k; int v; gretl_matrix *e; gretl_matrix *M; s->oc = oc_set_new(); if (!s->oc) return 12; e = gretl_matrix_alloc(s->nobs, 1); if (e) { gretl_matrix...
int nlspec_add_ivreg_oc(nlspec *s, int lhv, const int *rlist, const double **Z) { gretl_matrix *e = NULL; gretl_matrix *M = NULL; int i, k, t, v; double x; int err = 0; s->oc = oc_set_new(); if (s->oc == NULL) { return E_ALLOC; } e = gretl_column_vector_alloc(s->nobs); ...
nlspec_add_ivreg_oc
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_orthcond(nlspec *s, const char *str, const DATASET *dset) { char *v4; const char *stra; int n; int err; int rtype; int ltype; char fmt[16]; char lname[32]; char rname[40]; unsigned long v14; v14 = __readfsqword(0x28u); ltype = 0; rtype = 0; err = 0; if (s->ci != 49) ret...
int nlspec_add_orthcond(nlspec *s, const char *str, const DATASET *dset) { char lname[VNAMELEN]; char rname[VNAMELEN]; char fmt[16]; int ltype = GRETL_TYPE_NONE; int rtype = GRETL_TYPE_NONE; int n, err = 0; if (s->ci != GMM) { return E_TYPES; } if (s->oc != NULL && s->oc->W != NULL) { gretl_...
nlspec_add_orthcond
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_param_list(nlspec *spec, int np, double *vals, char **names) { return nlspec_add_scalar_params(spec, np, vals, names, OPT_NONE); }
int nlspec_add_param_list(nlspec *spec, int np, double *vals, char **names) { return nlspec_add_scalar_params(spec, np, vals, names, OPT_NONE); }
nlspec_add_param_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_param_names(nlspec *spec, const char *s) { const char *sa; int err; int n; const char *test; user_var *uv; gretl_array *a; char *names; char *p; char sname[40]; unsigned long v12; v12 = __readfsqword(0x28u); test = 0; err = 0; sa = &s[strspn(s, " ")]; if (*sa == 34) { p...
static int nlspec_add_param_names(nlspec *spec, const char *s) { const char *test = NULL; int n, err = 0; s += strspn(s, " "); if (*s == '"') { const char *p = strchr(s + 1, '"'); if (p == NULL) { err = E_INVARG; } else { n = p - s - 1; if (n > 0) { spec->parnames = gre...
nlspec_add_param_names
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_param_with_deriv(nlspec *spec, const char *s) { char *v2; GretlType type; int err; char *name; char *deriv; gretl_bundle *b; const char *p; unsigned long v10; v10 = __readfsqword(0x28u); p = s; name = 0; deriv = 0; b = 0; type = GRETL_TYPE_NONE; err = 0; if (spec->ci == 4...
int nlspec_add_param_with_deriv(nlspec *spec, const char *s) { const char *p = s; char *name = NULL; char *deriv = NULL; gretl_bundle *b = NULL; GretlType type = 0; int err = 0; if (spec->ci == GMM) { gretl_errmsg_set(_("Analytical derivatives cannot be used with GMM")); return E_DATA; } if ...
nlspec_add_param_with_deriv
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_params_from_line(nlspec *s, const char *str) { char *v2; const char *stra; nlspec *sa; int err; GretlType type; int i; int nf; gretlopt opt; char *name; gretl_bundle *bundle[2]; sa = s; stra = str; bundle[1] = (gretl_bundle *)__readfsqword(0x28u); nf = count_fields(str, 0); ...
static int nlspec_add_params_from_line(nlspec *s, const char *str) { int i, nf = count_fields(str, NULL); int err = 0; if (s->params != NULL) { gretl_errmsg_set(_("Only one 'params' specification is allowed")); return E_DATA; } else if (nf == 0) { return E_PARSE; } #if NLS_DEBUG fprintf(stderr...
nlspec_add_params_from_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_scalar_params(nlspec *spec, int np, double *vals, char **names, gretlopt opt) { char opta; int i; int err; opta = opt; err = 0; if (spec->params || !np) return 2; for (i = 0; i < np && !err; ++i) { if ((opta & 1) != 0) err = add_auxiliary_scalar(n...
static int nlspec_add_scalar_params(nlspec *spec, int np, double *vals, char **names, gretlopt opt) { int i, err = 0; if (spec->params != NULL || np == 0) { return E_DATA; } for (i = 0; i < np && !err; i++) { if (opt & OPT_A) { err = add_auxiliary_scalar(name...
nlspec_add_scalar_params
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_add_weights(nlspec *s, const char *str) { char *v3; char *v4; ocset *oc; char *v6; int err; unsigned int k; err = 0; if (s->ci != 49) return 37; if (s->oc) { if (s->oc->W) { v4 = gettext("Weights are already defined"); gretl_errmsg_set(v4); return 2; } else if...
int nlspec_add_weights(nlspec *s, const char *str) { int k, err = 0; if (s->ci != GMM) { return E_TYPES; } if (s->oc == NULL) { gretl_errmsg_set(_("Weights must come after orthogonality conditions")); return E_DATA; } if (s->oc->W != NULL) { gretl_errmsg_set(_("Weights are already defined...
nlspec_add_weights
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nlspec_destroy(nlspec *spec) { clear_nlspec(spec); free(spec); }
void nlspec_destroy(nlspec *spec) { clear_nlspec(spec); free(spec); }
nlspec_destroy
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nlspec_destroy_arrays(nlspec *s) { free(s->params); s->params = 0; s->nparam = 0; free(s->coeff); s->coeff = 0; s->ncoeff = 0; }
void nlspec_destroy_arrays(nlspec *s) { free(s->params); s->params = NULL; s->nparam = 0; free(s->coeff); s->coeff = NULL; s->ncoeff = 0; }
nlspec_destroy_arrays
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
nlspec *nlspec_new(int ci, const DATASET *dset) { nlspec *spec; spec = (nlspec *)malloc(0x128u); if (!spec) return 0; spec->nlfunc = 0; spec->params = 0; spec->nparam = 0; spec->aux = 0; spec->naux = 0; spec->genrs = 0; spec->ngenrs = 0; spec->generr = 0; spec->hgen = 0; spec->hesscall = ...
nlspec *nlspec_new(int ci, const DATASET *dset) { nlspec *spec; spec = malloc(sizeof *spec); if (spec == NULL) { return NULL; } spec->nlfunc = NULL; spec->params = NULL; spec->nparam = 0; spec->aux = NULL; spec->naux = 0; spec->genrs = NULL; spec->ngenrs = 0; spec->generr = 0; spec->...
nlspec_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nlspec_print_gmm_info(const nlspec *spec, PRN *prn) { int i; if (spec->oc && spec->oc->lnames && spec->oc->rnames) { for (i = 0; i < spec->oc->n_names; ++i) pprintf(prn, "orthog %s ; %s\n", spec->oc->lnames[i], spec->oc->rnames[i]); pprintf(prn, "weights %s\n", spec->oc->Wname); ...
void nlspec_print_gmm_info(const nlspec *spec, PRN *prn) { int i; if (spec->oc == NULL || spec->oc->lnames == NULL || spec->oc->rnames == NULL) { return; } for (i = 0; i < spec->oc->n_names; i++) { pprintf(prn, "orthog %s ; %s\n", spec->oc->lnames[i], spec->oc->rnames[i]); } pprintf(prn, "w...
nlspec_print_gmm_info
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_push_param(nlspec *s, const char *name, GretlType type, gretl_bundle *bundle, char *deriv) { int rows; int err; int np; parm *params; parm *p; gretl_matrix *m; double x; np = s->nparam; params = (parm *)realloc(s->params, 112LL * (np + 1)); if (!params) return 1...
static int nlspec_push_param(nlspec *s, const char *name, GretlType type, gretl_bundle *bundle, char *deriv) { parm *params, *p; int np = s->nparam; int err; params = realloc(s->params, (np + 1) * sizeof *params); if (params == NULL) { return E_ALLOC; } p = &params[np]; ...
nlspec_push_param
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nlspec_set_regression_function(nlspec *spec, const char *fnstr, const DATASET *dset) { char *v4; char *v5; char *v6; int v7; int err; int flen; char *vname; char *rhs; const char *p; unsigned long v14; v14 = __readfsqword(0x28u); p = fnstr; vname = 0; ...
int nlspec_set_regression_function(nlspec *spec, const char *fnstr, const DATASET *dset) { const char *p = fnstr; char *vname = NULL; char *rhs = NULL; int flen, err = 0; if (spec->nlfunc != NULL) { free(spec->nlfunc); spec->nlfunc = NULL; } spec->dv = 0; if...
nlspec_set_regression_function
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nlspec_set_t1_t2(nlspec *spec, int t1, int t2) { if (spec) { spec->t1 = t1; spec->t2 = t2; spec->nobs = t2 - t1 + 1; } }
void nlspec_set_t1_t2(nlspec *spec, int t1, int t2) { if (spec != NULL) { spec->t1 = t1; spec->t2 = t2; spec->nobs = t2 - t1 + 1; } }
nlspec_set_t1_t2
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double nm_call(BFGS_CRIT_FUNC cfunc, double *b, void *data, int *ncalls, int minimize) { double ret; ret = cfunc(b, data); ++*ncalls; if (minimize) return ret; if (fabs(ret) > 1.797693134862316e308) return ret; return -ret; }
static double nm_call(BFGS_CRIT_FUNC cfunc, double *b, void *data, int *ncalls, int minimize) { double ret = cfunc(b, data); *ncalls += 1; return minimize ? ret : na(ret) ? ret : -ret; }
nm_call
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int no_data_check(const DATASET *dset) { if (dset && dset->n && dset->v) return 0; else return 42; }
static int no_data_check(const DATASET *dset) { if (dset == NULL || dset->n == 0 || dset->v == 0) { return E_NODATA; } else { return 0; } }
no_data_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int no_data_error(parser *p) { p->err = 42; return 42; }
static int no_data_error(parser *p) { p->err = E_NODATA; return E_NODATA; }
no_data_error
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int no_data_plot(gretlopt opt) { int err; int i; int np; FILE *fp; unsigned long v6; v6 = __readfsqword(0x28u); fp = 0; np = 0; err = 0; for (i = 0; i < plot.nlines; ++i) { if (!strncmp(plot.lines[i], "plot ", 5u) || !strncmp(plot.lines[i], "splot ", 6u)) ++np; } if (np) { ...
static int no_data_plot(gretlopt opt) { FILE *fp = NULL; int i, np = 0; int err = 0; for (i = 0; i < plot.nlines; i++) { if (!strncmp(plot.lines[i], "plot ", 5) || !strncmp(plot.lines[i], "splot ", 6)) { np++; } } if (np == 0) { gretl_errmsg_set("plot: nothing to plot"); retu...
no_data_plot
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int no_scalar_default(fn_param *fp) { int ret; ret = 0; if (fp->deflt == -1.0e200) return 1; if (fp->type != 6) return fabs(fp->deflt) > 1.797693134862316e308; return ret; }
static int no_scalar_default(fn_param *fp) { int ret = 0; if (default_unset(fp)) { ret = 1; } else if (fp->type != GRETL_TYPE_DOUBLE && na(fp->deflt)) { ret = 1; } return ret; }
no_scalar_default
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int node_get_bool(NODE *n, parser *p, int deflt) { int ret; int k; ret = -1; if (!n || n->t == 85) { if ((unsigned int)deflt > 1) p->err = 15; else return deflt; } else { k = node_get_int(n, p); if (!p->err) return k != 0; } return ret; }
static int node_get_bool(NODE *n, parser *p, int deflt) { int ret = -1; if (!null_node(n)) { int k = node_get_int(n, p); if (!p->err) { ret = (k != 0); } } else if (deflt == 0 || deflt == 1) { ret = deflt; } else { p->err = E_ARGS; } return ret; }
node_get_bool
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_bundle *node_get_bundle(NODE *n, parser *p) { NODE *na; gretl_bundle *b; b = 0; if (n->t == 58) return n->v.b; if (n->t == 4) { na = n->L; if (na->t == 58) return na->v.b; else p->err = 37; } else { p->err = 37; } return b; }
static gretl_bundle *node_get_bundle(NODE *n, parser *p) { gretl_bundle *b = NULL; if (n->t == BUNDLE) { b = n->v.b; } else if (n->t == U_ADDR) { n = n->L; if (n->t != BUNDLE) { p->err = E_TYPES; } else { b = n->v.b; } } else { p->err = E_TYPES; } return b; }
node_get_bundle
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double node_get_double(NODE *n, int i, parser *p) { char *str; long v5; if (n->t == 54) return n->v.xval; if (n->t == 57) { str = (char *)*((_QWORD *)n->v.str + 1); v5 = 8LL * i; } else { str = n->v.str; v5 = 8LL * (p->dset->t1 + i); } return *(double *)&str[v5]; }
static double node_get_double(NODE *n, int i, parser *p) { if (n->t == NUM) { return n->v.xval; } else if (n->t == MAT) { return n->v.m->val[i]; } else { return n->v.xvec[p->dset->t1 + i]; } }
node_get_double
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *node_get_fncall(NODE *n, parser *p) { char *ret; ret = 0; if (n->t == 60) { ret = n->v.str; if (!is_function_call(ret)) p->err = 37; } else { p->err = 37; } return ret; }
static const char *node_get_fncall(NODE *n, parser *p) { const char *ret = NULL; if (n->t != STR) { p->err = E_TYPES; } else { ret = n->v.str; if (!is_function_call(ret)) { p->err = E_TYPES; } } return ret; }
node_get_fncall
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
guint32 node_get_guint32(NODE *n, parser *p) { double x; x = node_get_scalar(n, p); if (p->err) return 0; else return gretl_unsigned_from_double(x, &p->err); }
static guint32 node_get_guint32(NODE *n, parser *p) { double x = node_get_scalar(n, p); if (p->err) { return 0; } else { return gretl_unsigned_from_double(x, &p->err); } }
node_get_guint32
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int node_get_int(NODE *n, parser *p) { double x; x = node_get_scalar(n, p); if (p->err) return -1; else return gretl_int_from_double(x, &p->err); }
static int node_get_int(NODE *n, parser *p) { double x = node_get_scalar(n, p); if (p->err) { return -1; } else { return gretl_int_from_double(x, &p->err); } }
node_get_int
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void node_get_int_or_series(int *ip_0, double **vecp, NODE *n, parser *p) { if (n->t == 54 || n->t == 57 && n->v.str && !*((_DWORD *)n->v.str + 6) && *n->v.ivec == 1 && *((_DWORD *)n->v.str + 1) == 1) { *ip_0 = node_get_int(n, p); } else if (n->t == 55) { *vecp = n->v.xvec; } else ...
static void node_get_int_or_series(int *ip, double **vecp, NODE *n, parser *p) { if (scalar_node(n)) { *ip = node_get_int(n, p); } else if (n->t == SERIES) { *vecp = n->v.xvec; } else { p->err = E_TYPES; } }
node_get_int_or_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int *node_get_list(NODE *n, parser *p) { int vnum; char *v3; unsigned int v; int *list; list = 0; v = 0; if (n->t == 56) { list = gretl_list_copy(n->v.ivec); } else if (n->t == 55 || n->t == 54) { if (n->t == 55) vnum = n->vnum; else vnum = node_get_int(n, p); v = vnum; ...
int *node_get_list(NODE *n, parser *p) { int *list = NULL; int v = 0; if (n->t == LIST) { list = gretl_list_copy(n->v.ivec); } else if (n->t == SERIES || n->t == NUM) { v = (n->t == SERIES) ? n->vnum : node_get_int(n, p); if (!p->err) { if (v < 0 || v >= p->dset->v) { p->err = E_UNKVA...
node_get_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *node_get_matrix(NODE *n, parser *p, int i, int argnum) { char *v5; int j; char *x; gretl_matrix *ret; if (p->err) return 0; if (n->t == 57) return n->v.m; if (n->t == 54) { if ((unsigned int)i < 4) { x = n->v.str; if (!mm_1[0]) { for (j = 0; j <= 3; ++j) ...
static gretl_matrix *node_get_matrix(NODE *n, parser *p, int i, int argnum) { static gretl_matrix *mm[4]; if (p->err) { return NULL; } else if (n->t == MAT) { return n->v.m; } else if (n->t != NUM) { if (argnum > 0) { gretl_errmsg_sprintf(_("arg %d is missing or of invalid type"), argnum); ...
node_get_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *node_get_matrix_lenient(NODE *n, int ok, parser *p) { gretl_matrix *m; m = 0; if (n->t == 54 && ok == 54) { m = gretl_matrix_from_scalar(n->v.xval); } else if (n->t == 55 && ok == 55) { m = gretl_vector_from_series(n->v.xvec, p->dset->t1, p->dset->t2); } else if (n->t == 56 && ok == 55)...
static gretl_matrix *node_get_matrix_lenient(NODE *n, int ok, parser *p) { gretl_matrix *m = NULL; if (n->t == NUM && (ok == NUM)) { m = gretl_matrix_from_scalar(n->v.xval); } else if (n->t == SERIES && (ok == SERIES)) { m = gretl_vector_from_series(n->v.xvec, p->dset->t1, p->dset->t2); } else if (n->t...
node_get_matrix_lenient
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int node_get_midas_method(NODE *n, parser *p) { unsigned int ret; ret = -1; if (n->t == 60) { if (!strcmp(n->v.str, "umidas")) { ret = 0; } else if (!strcmp(n->v.str, "nealmon")) { ret = 1; } else if (!strcmp(n->v.str, "beta0")) { ret = 2; } else if (!strcmp(n->v.str, "betan")) ...
static int node_get_midas_method(NODE *n, parser *p) { int ret = -1; if (n->t == STR) { if (!strcmp(n->v.str, "umidas")) { ret = MIDAS_U; } else if (!strcmp(n->v.str, "nealmon")) { ret = MIDAS_NEALMON; } else if (!strcmp(n->v.str, "beta0")) { ret = MIDAS_BETA0; } else if (!strcmp(...
node_get_midas_method
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *node_get_ptr(NODE *n, int f, parser *p, int *donate) { _BYTE t[12]; *(_DWORD *)&t[8] = 0; *(_QWORD *)t = (unsigned int)n->t; *donate = 0; if (f == 615 || f == 617) { switch (*(_DWORD *)t) { case ';': *(_QWORD *)&t[4] = n->v.str; break; case '7': *(_QWORD *)&t[4] = n->v.str...
static void *node_get_ptr(NODE *n, int f, parser *p, int *donate) { void *ptr = NULL; int t = n->t; *donate = 0; if (f == F_DEFBUNDLE || f == F_DEFARGS) { if (t == ARRAY) { ptr = n->v.a; } else if (t == SERIES) { ptr = n->v.xvec; } else if (t == NUM) { ptr = &n->v.xval; } el...
node_get_ptr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *node_get_real_matrix(NODE *n, parser *p, int i, int argnum) { gretl_matrix *m; m = node_get_matrix(n, p, i, argnum); if (p->err || !m->is_complex) return m; p->err = 50; return 0; }
static gretl_matrix *node_get_real_matrix(NODE *n, parser *p, int i, int argnum) { gretl_matrix *m = node_get_matrix(n, p, i, argnum); if (!p->err && m->is_complex) { p->err = E_CMPLX; return NULL; } else { return m; } }
node_get_real_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double node_get_scalar(NODE *n, parser *p) { if (n->t == 54) return n->v.xval; if (n->t == 57 && n->v.str && !*((_DWORD *)n->v.str + 6) && *n->v.ivec == 1 && *((_DWORD *)n->v.str + 1) == 1) return **((double **)n->v.str + 1); p->err = 17; return NAN; }
static double node_get_scalar(NODE *n, parser *p) { if (n->t == NUM) { return n->v.xval; } else if (scalar_matrix_node(n)) { return n->v.m->val[0]; } else { p->err = E_INVARG; return NADBL; } }
node_get_scalar
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int node_is_false(NODE *n, parser *p) { return node_get_scalar(n, p) == 0.0; }
static int node_is_false(NODE *n, parser *p) { return (node_get_scalar(n, p) == 0.0); }
node_is_false
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int node_is_true(NODE *n, parser *p) { double x; x = node_get_scalar(n, p); return fabs(x) <= 1.797693134862316e308 && x != 0.0; }
static int node_is_true(NODE *n, parser *p) { double x = node_get_scalar(n, p); return !na(x) && x != 0.0; }
node_is_true
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void node_nullify_ptr(NODE *n) { switch (n->t) { case '9': n->v.str = 0; break; case '<': n->v.str = 0; break; case ':': n->v.str = 0; break; case '8': n->v.str = 0; break; case ';': n->v.str = 0; break; case '7': n->v.str = 0; break; } }
static void node_nullify_ptr(NODE *n) { if (n->t == MAT) n->v.m = NULL; else if (n->t == STR) n->v.str = NULL; else if (n->t == BUNDLE) n->v.b = NULL; else if (n->t == LIST) n->v.ivec = NULL; else if (n->t == ARRAY) n->v.a = NULL; else if (n->t == SERIES) n->v.xvec = NULL; }
node_nullify_ptr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void node_reattach_data(NODE *n, parser *p) { GretlType type; char **data; if (n->t == 55) { reattach_series(n, p); return; } type = GRETL_TYPE_NONE; data = 0; if (!n->uv || n->t == 56 && gretl_looping()) n->uv = get_user_var_by_name(n->vname); if (n->uv) { data = (char **)n->uv->ptr; ...
static void node_reattach_data(NODE *n, parser *p) { if (n->t == SERIES) { reattach_series(n, p); } else { GretlType type = 0; void *data = NULL; if (n->uv == NULL || (n->t == LIST && gretl_looping())) { n->uv = get_user_var_by_name(n->vname); } if (n->uv != NULL) { data = n->u...
node_reattach_data
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int node_replace_scalar(NODE *n, double x) { int err; err = 0; if (n->uv && n->uv->type == GRETL_TYPE_DOUBLE) { *(double *)n->uv->ptr = x; } else { if (n->uv) fwrite("*** node_replace scalar: node uv of wrong type!\n", 1u, 0x30u, stderr); else fwrite("*** node_replace scala...
static int node_replace_scalar(NODE *n, double x) { int err = 0; if (n->uv != NULL && n->uv->type == GRETL_TYPE_DOUBLE) { uvar_set_scalar_fast(n->uv, x); } else { if (n->uv == NULL) { fprintf(stderr, "*** node_replace scalar: node uv is NULL!\n"); } else { fprintf(stderr, "*** node_replac...
node_replace_scalar
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void node_set_double(NODE *n, int i, double x, parser *p) { char *str; long v5; if (n->t == 54) { n->v.xval = x; } else { if (n->t == 57) { str = (char *)*((_QWORD *)n->v.str + 1); v5 = 8LL * i; } else { str = n->v.str; v5 = 8LL * (p->dset->t1 + i); } *(double *)&str...
static void node_set_double(NODE *n, int i, double x, parser *p) { if (n->t == NUM) { n->v.xval = x; } else if (n->t == MAT) { n->v.m->val[i] = x; } else { n->v.xvec[p->dset->t1 + i] = x; } }
node_set_double
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void node_type_error(int ntype, int argnum, int goodt, NODE *bad, parser *p) { const char *v5; char *v6; const char *v7; char *v8; char *v9; const char *v10; char *v11; char *v12; const char *v13; char *v14; char *v15; const char *v16; char *v17; const char *nstr; if (ntype) { parser_...
static void node_type_error(int ntype, int argnum, int goodt, NODE *bad, parser *p) { const char *nstr; if (ntype == 0) { p->err = E_TYPES; return; } parser_ensure_error_buffer(p); if (ntype == LAG) { nstr = (goodt == NUM) ? "lag order" : "lag variable"; } else { ...
node_type_error
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int non_numeric_check(DATASET *dset, int **plist, gretl_string_table **pst, PRN *prn) { int v5; double v6; char *v7; char *v8; char *v9; char *v10; char *v11; int i; int ia; int ib; int ic; int j; int t; int ta; int tb; int tc; int nn; int err; int nnon; int...
int non_numeric_check(DATASET *dset, int **plist, gretl_string_table **pst, PRN *prn) { int *list = NULL; int i, j, t, nn = 0; int err = 0; #if CDEBUG > 1 fprintf(stderr, "non_numeric_check: testing %d series, pst = %p\n", dset->v - 1, (void *)pst); #endif if (pst == NULL) { ...
non_numeric_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void nonlin_test_header(int code, PRN *prn) { char *v2; pputc(prn, 10); if (code == 1) v2 = gettext("Non-linearity test (squared terms)"); else v2 = gettext("Non-linearity test (log terms)"); pputs(prn, v2); pputs(prn, "\n\n"); }
static void nonlin_test_header(int code, PRN *prn) { pputc(prn, '\n'); if (code == AUX_SQ) { pputs(prn, _("Non-linearity test (squared terms)")); } else { pputs(prn, _("Non-linearity test (log terms)")); } pputs(prn, "\n\n"); }
nonlin_test_header
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nonlinear_wald_test(gretl_restriction *rset, gretlopt opt, PRN *prn) { char *rfunc; char *v4; int rows; int err; int published; gretl_matrix *coeff; gretl_matrix *vcv; gretl_matrix *J; gretl_matrix *bread; gretl_matrix *ham; equation_system *sys; MODEL *pmod; char fncall[72]; unsigned lo...
static int nonlinear_wald_test(gretl_restriction *rset, gretlopt opt, PRN *prn) { gretl_matrix *coeff = NULL; gretl_matrix *vcv = NULL; gretl_matrix *J = NULL; gretl_matrix *bread = NULL; gretl_matrix *ham = NULL; char fncall[64]; int published = 0; int err = 0; if (get...
nonlinear_wald_test
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nonlinearity_test(MODEL *pmod, DATASET *dset, ModelAuxCode aux, gretlopt opt, PRN *prn) { int err; int save_t1; int save_t2; int orig_nvar; int *tmplist; unsigned long v14; v14 = __readfsqword(0x28u); save_t1 = dset->t1; save_t2 = dset->t2; tmplist = 0; orig_nvar = dset-...
int nonlinearity_test(MODEL *pmod, DATASET *dset, ModelAuxCode aux, gretlopt opt, PRN *prn) { int save_t1 = dset->t1; int save_t2 = dset->t2; int *tmplist = NULL; const int orig_nvar = dset->v; int err = 0; if (!command_ok_for_model(ADD, 0, pmod)) { return E_NOTIMP; } if (pmo...
nonlinearity_test
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int nonneg_integer_series(const DATASET *dset, int v) { int t; double xt; for (t = dset->t1; t <= dset->t2; ++t) { xt = dset->Z[v][t]; if (fabs(xt) <= 1.797693134862316e308 && (floor(xt) != xt || xt < 0.0)) return 0; } return 1; }
static int nonneg_integer_series(const DATASET *dset, int v) { double xt; int t; for (t = dset->t1; t <= dset->t2; t++) { xt = dset->Z[v][t]; if (!na(xt) && (xt != floor(xt) || xt < 0)) { return 0; } } return 1; }
nonneg_integer_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double normal_cdf(double x) { double y; y = ndtr(x); if (get_cephes_errno()) return NAN; if (y == 1.0) return 0.9999999999999999; return y; }
double normal_cdf(double x) { double y = ndtr(x); if (get_cephes_errno()) { y = NADBL; } else if (y == 1.0) { y = NORM_CDF_MAX; } return y; }
normal_cdf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0