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 gretl_fill_pdf_array(int dist, const double *parm, double *x, int n) { int err; err = 2; if (pdist_check_input(dist, parm, 0.0) == 34) return 34; switch (dist) { case 3: return normal_pdf_array(x, n); case 4: return student_pdf_array(*parm, x, n); case 5: return chisq_pdf_array((int)*...
int gretl_fill_pdf_array(int dist, const double *parm, double *x, int n) { int err = E_DATA; if (pdist_check_input(dist, parm, 0) == E_MISSDATA) { return E_MISSDATA; } if (dist == D_NORMAL) { err = normal_pdf_array(x, n); } else if (dist == D_STUDENT) { err = student_pdf_array(parm[0], x, n); ...
gretl_fill_pdf_array
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_fill_random_array(double *x, int t1, int t2, int dist, const double *parm, const double *vecp1, const double *vecp2) { int t; int ta; int tb; int tc; int td; int te; int tf; int tg; int th; int ti; int tj; int tk; int tl; int ...
static int gretl_fill_random_array(double *x, int t1, int t2, int dist, const double *parm, const double *vecp1, const double *vecp2) { int t, err = 0; if (dist == D_UNIFORM) { double min = parm[0], max = parm[1]; if (vecp1 != NULL || ...
gretl_fill_random_array
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_fill_random_series(double *x, int dist, const double *parm, const double *vecp1, const double *vecp2, const DATASET *dset) { return gretl_fill_random_array(x, dset->t1, dset->t2, dist, parm, vecp1, vecp2); }
int gretl_fill_random_series(double *x, int dist, const double *parm, const double *vecp1, const double *vecp2, const DATASET *dset) { return gretl_fill_random_array(x, dset->t1, dset->t2, dist, parm, vecp1, vecp2); }
gretl_fill_random_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_filled_matrix_new(int r, int c, double val) { int i; int n; gretl_matrix *m; if (r < 0 || c < 0) return 0; if (r && c) { n = c * r; m = gretl_matrix_alloc(r, c); if (m) { if (val == 0.0) { memset(m->val, 0, 8LL * n); } else { for (i = 0; i < n; ...
static gretl_matrix *gretl_filled_matrix_new(int r, int c, double val) { gretl_matrix *m = NULL; if (r < 0 || c < 0) { return NULL; } else if (r == 0 || c == 0) { m = gretl_null_matrix_new(); if (m != NULL) { m->rows = r; m->cols = c; } } else { int i, n = r * c; m = gretl_...
gretl_filled_matrix_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_finite_scalar_serialize(double x, const char *name, PRN *prn) { pprintf(prn, "<scalar name=\"%s\" value=\"%.17g\"/>\n", name, x); }
void gretl_finite_scalar_serialize(double x, const char *name, PRN *prn) { pprintf(prn, "<scalar name=\"%s\" value=\"%.17g\"/>\n", name, x); }
gretl_finite_scalar_serialize
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *gretl_fix_exponent(char *s) { size_t v1; int n; char *p; p = strstr(s, "+00"); if (p || (p = strstr(s, "-00")) != 0) { if (p[3]) { v1 = strlen(p + 1); memmove(p + 1, p + 2, v1); } } n = strlen(s); if (s[n - 1] == 46 || s[n - 1] == 44) s[n - 1] = 0; return s; }
char *gretl_fix_exponent(char *s) { char *p; int n; if ((p = strstr(s, "+00")) || (p = strstr(s, "-00"))) { if (*(p + 3)) { memmove(p + 1, p + 2, strlen(p + 1)); } } n = strlen(s); if (s[n - 1] == '.' || s[n - 1] == ',') { s[n - 1] = '\0'; } return s; }
gretl_fix_exponent
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_flush(PRN *prn) { CMD cmd; ExecState s; unsigned long v3; v3 = __readfsqword(0x28u); if (gui_callback) { memset(&s, 0, sizeof(s)); memset(&cmd, 0, sizeof(cmd)); cmd.ci = 41; cmd.opt = OPT_Q; s.cmd = &cmd; gui_callback(&s, 0, GRETL_OBJ_NULL); } else { gretl_print_flush...
void gretl_flush(PRN *prn) { if (gui_callback != NULL) { ExecState s = {0}; CMD cmd = {0}; cmd.ci = FLUSH; cmd.opt = OPT_Q; s.cmd = &cmd; gui_callback(&s, NULL, 0); } else { gretl_print_flush_stream(prn); } }
gretl_flush
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
FILE *gretl_fopen(const char *fname, const char *mode) { int v2; FILE *fp; gretl_error_clear(); fp = fopen(fname, mode); if (*__errno_location()) { v2 = *__errno_location(); gretl_errmsg_set_from_errno(fname, v2); } return fp; }
FILE *gretl_fopen(const char *fname, const char *mode) { FILE *fp = NULL; gretl_error_clear(); #ifdef WIN32 fp = g_fopen(fname, mode); #else fp = fopen(fname, mode); #endif if (errno != 0) { gretl_errmsg_set_from_errno(fname, errno); } return fp; }
gretl_fopen
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *gretl_func_get_arg_name(const char *argvar, int *err) { int i; int n; char *ret; fncall *call; ufunc *u; call = current_function_call(); ret = 0; *err = 2; if (call) { u = call->fun; n = call->argc; for (i = 0; i < n; ++i) { if (!strcmp(argvar, u->params[i].name)) { *e...
char *gretl_func_get_arg_name(const char *argvar, int *err) { fncall *call = current_function_call(); char *ret = NULL; *err = E_DATA; if (call != NULL) { ufunc *u = call->fun; int i, n = call->argc; for (i = 0; i < n; i++) { if (!strcmp(argvar, u->params[i].name)) { *err = 0; ...
gretl_func_get_arg_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_function_append_line(ExecState *s) { char *v2; int ignore; int err; int blank; int i; char *origline; CMD *cmd; const char *line; ufunc *fun; cmd = s->cmd; line = s->line; fun = current_fdef; ignore = 0; err = 0; if (current_fdef) { origline = gretl_strdup(line); blank =...
int gretl_function_append_line(ExecState *s) { static int ifdepth; CMD *cmd = s->cmd; char *line = s->line; char *origline = NULL; ufunc *fun = current_fdef; int blank = 0; int ignore = 0; int err = 0; if (fun == NULL) { fprintf(stderr, "gretl_function_append_line: fun is NULL\n"); return 1; ...
gretl_function_append_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *gretl_function_complete(const char *s) { int i; int ia; size_t n; n = strlen(s); for (i = 0; ptrfuncs[i].str; ++i) { if (!strncmp(s, ptrfuncs[i].str, n)) return ptrfuncs[i].str; } for (ia = 0; funcs[ia].str; ++ia) { if (!strncmp(s, funcs[ia].str, n)) return funcs[ia].str; ...
const char *gretl_function_complete(const char *s) { size_t n = strlen(s); int i; for (i = 0; ptrfuncs[i].str != NULL; i++) { if (!strncmp(s, ptrfuncs[i].str, n)) { return ptrfuncs[i].str; } } for (i = 0; funcs[i].str != NULL; i++) { if (!strncmp(s, funcs[i].str, n)) { return funcs[i...
gretl_function_complete
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_function_depth() { return fn_executing; }
int gretl_function_depth(void) { return fn_executing; }
gretl_function_depth
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_function_exec(fncall *call, int rtype, DATASET *dset, void *ret, char **descrip, PRN *prn) { gretlopt v7; int indent0; int loopstart; int err; int orig_n; int orig_t1; int orig_t2; int started; int redir_level; int retline; int debugging; int i; int lineno; ...
int gretl_function_exec(fncall *call, int rtype, DATASET *dset, void *ret, char **descrip, PRN *prn) { DEBUG_READLINE get_line = NULL; DEBUG_OUTPUT put_func = NULL; ufunc *u = call->fun; ExecState state; MODEL *model = NULL; char line[MAXLINE]; CMD cmd; int orig_n = 0; int orig...
gretl_function_exec
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
fnpkg *gretl_function_get_package(const ufunc *fun) { if (fun) return fun->pkg; else return 0; }
fnpkg *gretl_function_get_package(const ufunc *fun) { return fun == NULL ? NULL : fun->pkg; }
gretl_function_get_package
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_function_hash_cleanup() { real_function_lookup(0, 0, 0); install_function_override(0, 0, 0); }
void gretl_function_hash_cleanup(void) { real_function_lookup(NULL, 0, NULL); install_function_override(NULL, NULL, NULL); }
gretl_function_hash_cleanup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
GHashTable *gretl_function_hash_init() { int i; int ia; int ib; GHashTable *ht; ht = (GHashTable *)g_hash_table_new(&g_str_hash, &g_str_equal); for (i = 0; ptrfuncs[i].str; ++i) g_hash_table_insert(ht, ptrfuncs[i].str, &ptrfuncs[i]); for (ia = 0; funcs[ia].str; ++ia) g_hash_table_insert(ht, funcs...
static GHashTable *gretl_function_hash_init(void) { GHashTable *ht; int i; ht = g_hash_table_new(g_str_hash, g_str_equal); for (i = 0; ptrfuncs[i].str != NULL; i++) { g_hash_table_insert(ht, (gpointer)ptrfuncs[i].str, &ptrfuncs[i]); } for (i = 0; funcs[i].str != NULL; i++) { g_hash_table_insert(h...
gretl_function_hash_init
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *gretl_function_package_get_path(const char *name, PkgType type) { int n_dirs; int found; int i; char *ret; char **dirs; const char *fndir; GDir *dir; const char *dname; char *p; char test[256]; char path[4104]; unsigned long v15; v15 = __readfsqword(0x28u); ret = 0; found = 0; if ...
char *gretl_function_package_get_path(const char *name, PkgType type) { char *ret = NULL; char path[FILENAME_MAX]; char **dirs; int err, found = 0; int i, n_dirs; if (type == PKG_ALL || type == PKG_SUBDIR) { if (is_gretl_addon(name)) { return gretl_addon_get_path(name); } } *path = '\0';...
gretl_function_package_get_path
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *gretl_function_package_path() { int err; if (!path_0[0]) { err = get_system_install_path(path_0, "functions"); if (err) err = get_user_install_path(path_0, "functions"); if (err) path_0[0] = 0; else slash_terminate(path_0); } return path_0; }
const char *gretl_function_package_path(void) { static char path[FILENAME_MAX]; if (*path == '\0') { int sys_first = 1; int err = 0; #if defined(OS_OSX) sys_first = 0; #elif defined(WIN32) sys_first = 0; #endif if (sys_first) { err = get_system_install_path(path, "functions"); if ...
gretl_function_package_path
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_function_print_code(ufunc *u, int tabwidth, PRN *prn) { int tabwidtha; int this_indent; int next_indent; int i; int j; unsigned long v10; tabwidtha = tabwidth; v10 = __readfsqword(0x28u); this_indent = 0; next_indent = 0; if (!u) return 2; if (!tabwidth) tabwidtha = 2; print...
int gretl_function_print_code(ufunc *u, int tabwidth, PRN *prn) { int this_indent = 0; int next_indent = 0; int i, j; if (u == NULL) { return E_DATA; } if (tabwidth == 0) { tabwidth = 2; } print_function_start(u, prn); for (i = 0; i < u->n_lines; i++) { adjust_indent(u->lines[i].s, &th...
gretl_function_print_code
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_function_recursing() { if (callstack) return *(_DWORD *)(*(_QWORD *)g_list_last(callstack) + 100LL) & 1; else return 0; }
int gretl_function_recursing(void) { if (callstack != NULL) { GList *tmp = g_list_last(callstack); fncall *call = tmp->data; return is_recursing(call); } else { return 0; } }
gretl_function_recursing
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char **gretl_function_retrieve_code(ufunc *u, int *nlines) { int v2; int i; int ia; int j; int ja; char **S; S = 0; j = 0; for (i = 0; i < u->n_lines; ++i) { if (!u->lines[i].ignore) ++j; } if (j > 0) S = strings_array_new(j); if (S) { *nlines = j; ja = 0; for (ia = 0;...
char **gretl_function_retrieve_code(ufunc *u, int *nlines) { char **S = NULL; int i, j = 0; for (i = 0; i < u->n_lines; i++) { if (!u->lines[i].ignore) { j++; } } if (j > 0) { S = strings_array_new(j); } if (S != NULL) { *nlines = j; j = 0; for (i = 0; i < u->n_lines; i++)...
gretl_function_retrieve_code
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_functions_cleanup() { int i; int ia; for (i = 0; i < n_ufuns; ++i) ufunc_free(ufuns[i]); free(ufuns); ufuns = 0; n_ufuns = 0; for (ia = 0; ia < n_pkgs; ++ia) function_package_free(pkgs[ia]); free(pkgs); pkgs = 0; n_pkgs = 0; }
void gretl_functions_cleanup(void) { int i; for (i = 0; i < n_ufuns; i++) { ufunc_free(ufuns[i]); } free(ufuns); ufuns = NULL; n_ufuns = 0; for (i = 0; i < n_pkgs; i++) { function_package_free(pkgs[i]); } free(pkgs); pkgs = NULL; n_pkgs = 0; }
gretl_functions_cleanup
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_fzero(double *bracket, double tol, ZFUNC zfunc, void *data, double *px, gretlopt opt, PRN *prn) { int v8; double v9; double v10; int v11; int v12; double v13; double v14; int i; int err; double y1; double ytol; double y; double y0; double x; double x0; double x1...
int gretl_fzero(double *bracket, double tol, ZFUNC zfunc, void *data, double *px, gretlopt opt, PRN *prn) { int MAXITER = 80; double ytol = 1.0e-14; double xtol = 1.0e-15; double y, y0, y1, y2; double x, x0, x1, x2; double dx, d0, d1; int i, err = 0; x0 = bracket[0]; x1 = bracket[1]; ...
gretl_fzero
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_gauss_hermite_matrix_new(int n, int *err) { return gretl_quadrule_matrix_new(n, 1, 0.0, 1.0, err); }
gretl_matrix *gretl_gauss_hermite_matrix_new(int n, int *err) { return gretl_quadrule_matrix_new(n, QUAD_GHERMITE, 0, 1, err); }
gretl_gauss_hermite_matrix_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_general_matrix_eigenvals(const gretl_matrix *m, int *err) { return real_gretl_dgeev(m, 0, 0, 1, err); }
gretl_matrix *gretl_general_matrix_eigenvals(const gretl_matrix *m, int *err) { return real_gretl_dgeev(m, NULL, NULL, 1, err); }
gretl_general_matrix_eigenvals
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_general_matrix_rcond(const gretl_matrix *A, int *err) { integer v3; integer v4; char norm; integer m; integer n; integer lda; integer info; double rcond; double anorm; gretl_matrix *a; integer *iwork; integer *ipiv; double *work; unsigned long v16; v16 = __readfsqword(0x28u);...
static double gretl_general_matrix_rcond(const gretl_matrix *A, int *err) { gretl_matrix *a = NULL; char norm = '1'; integer m, n, lda, info; integer *iwork = NULL; integer *ipiv = NULL; double *work = NULL; double rcond = NADBL; *err = 0; if (gretl_is_null_matrix(A)) { return NADBL; } m = ...
gretl_general_matrix_rcond
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_gensymm_eigenvals(const gretl_matrix *A, const gretl_matrix *B, gretl_matrix *V, int *err) { int n; gretl_matrix *evals; gretl_matrix *K; gretl_matrix *tmp; evals = 0; if (A && A->rows && A->cols && B && B->rows...
gretl_matrix *gretl_gensymm_eigenvals(const gretl_matrix *A, const gretl_matrix *B, gretl_matrix *V, int *err) { gretl_matrix *K = NULL; gretl_matrix *tmp = NULL; gretl_matrix *evals = NULL; int n; #if GSDEBUG gretl_matrix_print(A, "...
gretl_gensymm_eigenvals
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_get_DW(int n, int k, int *err) { gretl_matrix *m; int (*dw_lookup)(int, int, gretl_matrix **); unsigned long v7; v7 = __readfsqword(0x28u); m = 0; dw_lookup = (int (*)(int, int, gretl_matrix **))get_plugin_function("dw_lookup"); if (dw_lookup) { *err = dw_lookup(n, k, &m); ...
gretl_matrix *gretl_get_DW(int n, int k, int *err) { int (*dw_lookup)(int, int, gretl_matrix **); gretl_matrix *m = NULL; dw_lookup = get_plugin_function("dw_lookup"); if (dw_lookup == NULL) { *err = E_FOPEN; return NULL; } *err = (*dw_lookup)(n, k, &m); return m; }
gretl_get_DW
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_get_cdf(int dist, const double *parm, double x) { double y; y = NAN; if (pdist_check_input(dist, parm, x) == 34) return NAN; switch (dist) { case 3: return normal_cdf(x); case 4: return student_cdf(*parm, x); case 5: return chisq_cdf((double)(int)*parm, x); case 6: retu...
double gretl_get_cdf(int dist, const double *parm, double x) { double y = NADBL; if (pdist_check_input(dist, parm, x) == E_MISSDATA) { return y; } if (dist == D_NORMAL) { y = normal_cdf(x); } else if (dist == D_STUDENT) { y = student_cdf(parm[0], x); } else if (dist == D_CHISQ) { y = chisq...
gretl_get_cdf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_get_cdf_inverse(int dist, const double *parm, double a) { double y; y = NAN; if (pdist_check_input(dist, parm, a) == 34) return NAN; switch (dist) { case 3: return normal_cdf_inverse(a); case 4: return student_cdf_inverse(*parm, a); case 5: return chisq_cdf_inverse((int)*parm...
double gretl_get_cdf_inverse(int dist, const double *parm, double a) { double y = NADBL; if (pdist_check_input(dist, parm, a) == E_MISSDATA) { return y; } if (dist == D_NORMAL) { y = normal_cdf_inverse(a); } else if (dist == D_STUDENT) { y = student_cdf_inverse(parm[0], a); } else if (dist == ...
gretl_get_cdf_inverse
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_get_critval(int dist, const double *parm, double a) { double x; x = NAN; if (pdist_check_input(dist, parm, a) == 34) return NAN; switch (dist) { case 3: return normal_critval(a); case 4: return student_critval(*parm, a); case 5: return chisq_critval((int)*parm, a); case 6: ...
double gretl_get_critval(int dist, const double *parm, double a) { double x = NADBL; if (pdist_check_input(dist, parm, a) == E_MISSDATA) { return x; } if (dist == D_NORMAL) { x = normal_critval(a); } else if (dist == D_STUDENT) { x = student_critval(parm[0], a); } else if (dist == D_CHISQ) { ...
gretl_get_critval
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_get_data(char *fname, DATASET *dset, gretlopt opt, PRN *prn) { gretlopt append_opt; int gdtsuff; append_opt = OPT_NONE; gretl_error_clear(); if (!gretl_addpath(fname, 0)) return 11; gdtsuff = has_native_data_suffix(fname); if ((opt & 0x80000) != 0) append_opt = OPT_T; if (gdtsuff) ...
int gretl_get_data(char *fname, DATASET *dset, gretlopt opt, PRN *prn) { gretlopt append_opt = OPT_NONE; int gdtsuff; char *test; int err = 0; gretl_error_clear(); #if 0 fprintf(stderr, "gretl_get_data: calling addpath\n"); #endif test = gretl_addpath(fname, 0); if (test == NULL) { return E_FOP...
gretl_get_data
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *gretl_get_gdt_description(const char *fname, int *err) { int found; xmlDocPtr doc; xmlNodePtr cur; xmlChar *buf; unsigned long v7; v7 = __readfsqword(0x28u); found = 0; buf = 0; gretl_error_clear(); if (has_suffix(fname, ".gdtb")) { gretl_errmsg_set("Binary data file, cannot access descri...
char *gretl_get_gdt_description(const char *fname, int *err) { xmlDocPtr doc; xmlNodePtr cur; int found = 0; xmlChar *buf = NULL; gretl_error_clear(); if (has_suffix(fname, ".gdtb")) { gretl_errmsg_set("Binary data file, cannot access description"); *err = E_DATA; return NULL; } *err = gr...
gretl_get_gdt_description
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
GretlType gretl_get_gen_type(const char *s) { GretlType t; int i; gpointer p; t = GRETL_TYPE_NONE; if (s) { if (!ht_0) { ht_0 = (GHashTable *)g_hash_table_new(&g_str_hash, &g_str_equal); for (i = 0; i < 11; ++i) g_hash_table_insert(ht_0, gentypes[i].word, (...
GretlType gretl_get_gen_type(const char *s) { static GHashTable *ht; gpointer p; GretlType t = 0; if (s == NULL) { if (ht != NULL) { g_hash_table_destroy(ht); ht = NULL; } return 0; } if (ht == NULL) { int i, n = G_N_ELEMENTS(gentypes); ht = g_hash_table_new(g_str_hash, g...
gretl_get_gen_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *gretl_get_object_and_type(const char *name, GretlObjType *type) { char *v3; int i; void *ret; ret = 0; *type = GRETL_OBJ_NULL; if (!name) return 0; for (i = 0; i < n_obj; ++i) { v3 = gretl_object_get_name(ostack[i].ptr, (GretlObjType)ostack[i].type); if (!strcmp(name, v3)) { ret =...
void *gretl_get_object_and_type(const char *name, GretlObjType *type) { void *ret = NULL; const char *test; int i; *type = GRETL_OBJ_NULL; if (name == NULL) { return NULL; } for (i = 0; i < n_obj; i++) { test = gretl_object_get_name(ostack[i].ptr, ostack[i].type); if (!strcmp(name, test)) {...
gretl_get_object_and_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void *gretl_get_object_by_name(const char *name) { return get_object_by_name(name, GRETL_OBJ_ANY, 0); }
void *gretl_get_object_by_name(const char *name) { return get_object_by_name(name, GRETL_OBJ_ANY, NULL); }
gretl_get_object_by_name
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_get_pdf(int dist, const double *parm, double x) { double y; y = NAN; if (pdist_check_input(dist, parm, x) == 34) return NAN; switch (dist) { case 3: return normal_pdf(x); case 4: return student_pdf(*parm, x); case 5: return chisq_pdf((int)*parm, x); case 6: return snede...
double gretl_get_pdf(int dist, const double *parm, double x) { double y = NADBL; if (pdist_check_input(dist, parm, x) == E_MISSDATA) { return y; } if (dist == D_NORMAL) { y = normal_pdf(x); } else if (dist == D_STUDENT) { y = student_pdf(parm[0], x); } else if (dist == D_CHISQ) { y = chisq...
gretl_get_pdf
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_get_pvalue(int dist, const double *parm, double x) { double y; y = NAN; if (pdist_check_input(dist, parm, x) == 34) return NAN; switch (dist) { case 3: y = normal_cdf_comp(x); break; case 4: y = student_cdf_comp(*parm, x); break; case 5: y = chisq_cdf_comp((double)(in...
double gretl_get_pvalue(int dist, const double *parm, double x) { double y = NADBL; if (pdist_check_input(dist, parm, x) == E_MISSDATA) { return y; } if (dist == D_NORMAL) { y = normal_cdf_comp(x); } else if (dist == D_STUDENT) { y = student_cdf_comp(parm[0], x); } else if (dist == D_CHISQ) { ...
gretl_get_pvalue
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_get_random_matrix(int dist, const double *parm, const double *vecp1, const double *vecp2, int rows, int cols, int *err) { _BYTE n[12]; *(_DWORD *)&n[8] = 0; *(_QWORD *)n = (unsigned int)(cols * rows); if (cols * row...
gretl_matrix *gretl_get_random_matrix(int dist, const double *parm, const double *vecp1, const double *vecp2, int rows, int cols, int *err) { gretl_matrix *m = NULL; int n = rows * cols; if (n <= 0) { *err = E_INVARG; } else { ...
gretl_get_random_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_get_random_scalar(int dist, const double *parm, int *err) { double x[2]; *(_QWORD *)&x[1] = __readfsqword(0x28u); *err = gretl_fill_random_array(x, 0, 0, dist, parm, 0, 0); return x[0]; }
double gretl_get_random_scalar(int dist, const double *parm, int *err) { double x; *err = gretl_fill_random_array(&x, 0, 0, dist, parm, NULL, NULL); return x; }
gretl_get_random_scalar
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
char *gretl_getenv(const char *key, int *defined, int *err) { char *val; const char *test; test = getenv(key); if (test) { *defined = 1; val = gretl_strdup(test); } else { *defined = 0; val = gretl_strdup(&byte_33E93F); } if (!val) *err = 12; return val; }
char *gretl_getenv(const char *key, int *defined, int *err) { char *test = getenv(key); char *val = NULL; if (test == NULL) { *defined = 0; val = gretl_strdup(""); } else { *defined = 1; val = gretl_strdup(test); } if (val == NULL) { *err = E_ALLOC; } return val; }
gretl_getenv
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_gini(int t1, int t2, const double *x) { int err; double g; unsigned long v6; v6 = __readfsqword(0x28u); err = 0; g = gini_coeff(x, t1, t2, 0, 0, &err); if (err) return NAN; return g; }
double gretl_gini(int t1, int t2, const double *x) { double g; int err = 0; g = gini_coeff(x, t1, t2, NULL, NULL, &err); if (err) { g = NADBL; } return g; }
gretl_gini
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_glib_grab_output(const char *prog, char **sout) { gchar *argv[2]; unsigned long v3; v3 = __readfsqword(0x28u); argv[0] = (gchar *)prog; argv[1] = 0; if (!(unsigned int)g_spawn_sync(0, argv, 0, 4, 0, 0, sout, 0, 0, 0)) { if (*sout) { g_free(*sout); *sout = 0; } } }
static void gretl_glib_grab_output(const char *prog, char **sout) { gchar *argv[] = {(gchar *)prog, NULL}; gboolean ok; ok = g_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, sout, NULL, NULL, NULL); if (!ok && *sout != NULL) { g_free(*sout); *sout = NULL; } }
gretl_glib_grab_output
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *gretl_gnuplot_path() { return paths.gnuplot; }
const char *gretl_gnuplot_path(void) { return paths.gnuplot; }
gretl_gnuplot_path
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *gretl_gnuplot_term_line(TermType ttype, PlotType ptype, GptFlags flags, const char *font) { term_line_2[0] = 0; if (font && !ad_hoc_font[0]) strcpy(ad_hoc_font, font); switch (ttype) { case GP_TERM_PNG: real_png_term_line(term_line_2, ptype, flags, 0, defa...
const char *gretl_gnuplot_term_line(TermType ttype, PlotType ptype, GptFlags flags, const char *font) { static char term_line[TERMLEN]; *term_line = '\0'; if (font != NULL && ad_hoc_font[0] == '\0') { strcpy(ad_hoc_font, font); } if (ttype == GP_TERM_PNG) { doubl...
gretl_gnuplot_term_line
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_gss(double *theta, double tol, int *ic, BFGS_CRIT_FUNC cfunc, void *data, gretlopt opt, PRN *prn) { _BOOL4 v7; double tola; int iter; int err; int minimize; double a; double b; double c; double d; double fc; double fd; tola = tol; a = theta[1]; b = theta[2]; c = b ...
int gretl_gss(double *theta, double tol, int *ic, BFGS_CRIT_FUNC cfunc, void *data, gretlopt opt, PRN *prn) { double gr = (sqrt(5.0) + 1) / 2.0; double a = theta[1]; double b = theta[2]; double c = b - (b - a) / gr; double d = a + (b - a) / gr; double fc, fd; int minimize = (opt & OPT_I); ...
gretl_gss
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_gunzip(char *zname, char *fname) { int v3; gzFile fz; FILE *fp; char buf[131072]; unsigned long v7; v7 = __readfsqword(0x28u); fz = gretl_gzopen(zname, "rb"); if (!fz) return 11; fp = gretl_fopen(fname, "wb"); if (fp) { while (1) { v3 = gzread(fz, buf, 0x20000); if (!v...
int gretl_gunzip(char *zname, char *fname) { char buf[GRETL_ZBUFSIZ]; size_t len; FILE *fp; gzFile fz; fz = gretl_gzopen(zname, "rb"); if (fz == Z_NULL) { return E_FOPEN; } fp = gretl_fopen(fname, "wb"); if (fp == NULL) { gzclose(fz); return E_FOPEN; } while ((len = gzread(fz, buf, ...
gretl_gunzip
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_gzip(char *fname, char *zname) { FILE *fp; gzFile fz; size_t len; char buf[131072]; unsigned long v7; v7 = __readfsqword(0x28u); fp = gretl_fopen(fname, "rb"); if (!fp) return 11; fz = gretl_gzopen(zname, "wb"); if (fz) { while (1) { len = fread(buf, 1u, 0x20000u, fp); ...
int gretl_gzip(char *fname, char *zname) { char buf[GRETL_ZBUFSIZ]; size_t len; FILE *fp; gzFile fz; fp = gretl_fopen(fname, "rb"); if (fp == NULL) { return E_FOPEN; } fz = gretl_gzopen(zname, "wb"); if (fz == Z_NULL) { fclose(fp); return E_FOPEN; } while ((len = fread(buf, 1, GRETL...
gretl_gzip
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
PRN *gretl_gzip_print_new(const char *fname, int comp_level, int *err) { if (fname) { if (comp_level >= -1 && comp_level <= 9) { return real_gretl_print_new(GRETL_PRINT_GZFILE, fname, 0, 0, comp_level, err); } else { fwrite("gretl_gzip_print_new: invalid compressi...
PRN *gretl_gzip_print_new(const char *fname, int comp_level, int *err) { if (fname == NULL) { fprintf(stderr, "gretl_gzip_print_new: must supply a filename\n"); return NULL; } else if (comp_level < -1 || comp_level > 9) { fprintf(stderr, "gretl_gzip_print_new: invalid compression level\n"); *err = E...
gretl_gzip_print_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gzFile gretl_gzopen(const char *fname, const char *mode) { int *v2; gzFile_s *fz; gretl_error_clear(); fz = (gzFile_s *)gzopen(fname, mode); if (*__errno_location()) { v2 = __errno_location(); gretl_errmsg_set_from_errno("gzopen", *v2); } return fz; }
gzFile gretl_gzopen(const char *fname, const char *mode) { gzFile fz = NULL; gretl_error_clear(); #ifdef WIN32 if (utf8_encoded(fname)) { gunichar2 *tmp = g_utf8_to_utf16(fname, -1, NULL, NULL, NULL); if (tmp != NULL) { fz = gzopen_w(tmp, mode); g_free(tmp); } } else { fz = gzope...
gretl_gzopen
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
const char *gretl_home() { return (const char *)&paths; }
const char *gretl_home(void) { return paths.gretldir; }
gretl_home
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
gretl_matrix *gretl_identity_matrix_new(int n) { long v2; int i; gretl_matrix *m; if (n < 0) return 0; if (!n) return gretl_null_matrix_new(); m = gretl_matrix_alloc(n, n); if (m) { for (i = 0; i < n * n; ++i) { if (i % (n + 1)) v2 = 0; else v2 = 0x3FF0000000000000...
gretl_matrix *gretl_identity_matrix_new(int n) { gretl_matrix *m; int i, k; if (n < 0) { return NULL; } else if (n == 0) { return gretl_null_matrix_new(); } m = gretl_matrix_alloc(n, n); if (m != NULL) { k = n * n; n++; for (i = 0; i < k; i++) { m->val[i] = (i % n) ? 0.0 : 1.0...
gretl_identity_matrix_new
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_if_state_check(int indent0) { char *v1; int err; err = 0; if (ifstate(8, 0, 0) != indent0) { v1 = gettext("Unmatched \"%s\""); gretl_errmsg_sprintf(v1, "if"); ifstate(9, 0, 0); return 18; } return err; }
int gretl_if_state_check(int indent0) { int indent = ifstate(GETINDENT, 0, NULL); int err = 0; if (indent != indent0) { gretl_errmsg_sprintf(_("Unmatched \"%s\""), "if"); ifstate(RELAX, 0, NULL); err = E_PARSE; } return err; }
gretl_if_state_check
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_if_state_clear() { ifstate(9, 0, 0); }
void gretl_if_state_clear(void) { #if IFDEBUG fprintf(stderr, "gretl_if_state_clear called\n"); #endif ifstate(RELAX, 0, NULL); }
gretl_if_state_clear
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_if_state_false() { return get_if_state(5); }
int gretl_if_state_false(void) { return get_if_state(IS_FALSE); }
gretl_if_state_false
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_if_state_finalize() { int err; err = 0; if (!ifstate(6, 0, 0)) { ifstate(9, 0, 0); return 18; } return err; }
int gretl_if_state_finalize(void) { int ret, err = 0; ret = ifstate(IS_TRUE, 0, NULL); if (!ret) { ifstate(RELAX, 0, NULL); err = E_PARSE; } return err; }
gretl_if_state_finalize
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_if_state_record() { return ifstate(8, 0, 0); }
int gretl_if_state_record(void) { return ifstate(GETINDENT, 0, NULL); }
gretl_if_state_record
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_if_state_reset(int indent) { ifstate(10, indent, 0); }
void gretl_if_state_reset(int indent) { ifstate(IFRESET, indent, NULL); }
gretl_if_state_reset
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_in_batch_mode() { return batch_mode_switch(0, 0); }
int gretl_in_batch_mode(void) { return batch_mode_switch(0, 0); }
gretl_in_batch_mode
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_in_gui_mode() { return gui_mode; }
int gretl_in_gui_mode(void) { return gui_mode; }
gretl_in_gui_mode
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_in_tool_mode() { return tool_mode; }
int gretl_in_tool_mode(void) { return tool_mode; }
gretl_in_tool_mode
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
void gretl_insert_builtin_string(const char *name, const char *s) { int i; int gui; int m; int ma; gsize bytes; gchar *u; unsigned long v8; v8 = __readfsqword(0x28u); gui = gretl_in_gui_mode(); for (i = 0; i < 12; ++i) { if (!strcmp(name, built_ins[i].name)) { g_free(built_ins[i].s); ...
void gretl_insert_builtin_string(const char *name, const char *s) { int i, n = sizeof built_ins / sizeof built_ins[0]; int m, gui = gretl_in_gui_mode(); for (i = 0; i < n; i++) { if (!strcmp(name, built_ins[i].name)) { g_free(built_ins[i].s); if (s == NULL) { built_ins[i].s = NULL; ...
gretl_insert_builtin_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_int_from_double(double x, int *err) { int k; k = -1; if (fabs(x) <= 1.797693134862316e308 && fabs(x) <= 2147483647.0 && fabs(x - nearbyint(x)) <= 0.001) return lrint(x); *err = 17; return k; }
int gretl_int_from_double(double x, int *err) { int k = -1; if (na(x) || fabs(x) > INT_MAX || fabs(x - nearbyint(x)) > 0.001) { *err = E_INVARG; } else { k = (int)lrint(x); } return k; }
gretl_int_from_double
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_int_from_string(const char *s, int *err) { int n; int na; char *test; double x; unsigned long v7; v7 = __readfsqword(0x28u); n = 0; if (s && *s) { if (((*__ctype_b_loc())[*s] & 0x400) != 0) { x = get_scalar_value_by_name(s, err); if (!*err) return gretl_int_from_double...
int gretl_int_from_string(const char *s, int *err) { char *test; int n = 0; if (s == NULL || *s == '\0') { *err = E_DATA; return 0; } if (isalpha(*s)) { double x = get_scalar_value_by_name(s, err); if (!*err) { n = gretl_int_from_double(x, err); } return n; } errno = 0; ...
gretl_int_from_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_inverse_compare_doubles(const void *a, const void *b) { return (*(double *)b > *(double *)a) - (*(double *)a > *(double *)b); }
int gretl_inverse_compare_doubles(const void *a, const void *b) { const double *da = (const double *)a; const double *db = (const double *)b; if (isnan(*da) || isnan(*db)) { if (!isnan(*da)) { return 1; } else if (!isnan(*db)) { return -1; } else { return 0; } } else { ret...
gretl_inverse_compare_doubles
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_inverse_from_cholesky_decomp(gretl_matrix *targ, const gretl_matrix *src) { char uplo; integer info; integer n; int err; unsigned long v7; v7 = __readfsqword(0x28u); uplo = 76; err = 0; if (!targ || !targ->rows || !targ->cols || !src || !src->rows || !...
int gretl_inverse_from_cholesky_decomp(gretl_matrix *targ, const gretl_matrix *src) { integer info, n; char uplo = 'L'; int err = 0; if (gretl_is_null_matrix(targ) || gretl_is_null_matrix(src)) { return E_DATA; } n = src->cols; if (n != src->rows || targ->cols...
gretl_inverse_from_cholesky_decomp
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_diagonal_matrix(gretl_matrix *a) { int i; int ia; if (!a || !a->rows || !a->cols) return 2; if (a->cols == a->rows) { for (i = 0; i < a->rows; ++i) { if (a->val[i * a->rows + i] == 0.0) return 3; } for (ia = 0; ia < a->rows; ++ia) a->val[ia * a->rows + ia] =...
int gretl_invert_diagonal_matrix(gretl_matrix *a) { double x; int i; if (gretl_is_null_matrix(a)) { return E_DATA; } if (a->cols != a->rows) { fputs("gretl_invert_diagonal_matrix: input is not square\n", stderr); return E_NONCONF; } for (i = 0; i < a->rows; i++) { if (gretl_matrix_get(a...
gretl_invert_diagonal_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_general_matrix(gretl_matrix *a) { integer n; integer info; integer lwork; int err; integer *ipiv; double *work; unsigned long v8; v8 = __readfsqword(0x28u); err = 0; if (!a || !a->rows || !a->cols || a->rows != a->cols) return 2; n = a->rows; ipiv = (integer *)malloc(4LL * ...
int gretl_invert_general_matrix(gretl_matrix *a) { integer n; integer info; integer lwork; integer *ipiv; double *work; int err = 0; if (gretl_is_null_matrix(a) || (a->rows != a->cols)) { return E_DATA; } n = a->rows; ipiv = malloc(n * sizeof *ipiv); if (ipiv == NULL) { return E_ALLOC; ...
gretl_invert_general_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_matrix(gretl_matrix *a) { int err; int s; if (!a || !a->rows || !a->cols) return 2; s = gretl_matrix_get_structure(a); switch (s) { case 6: return 0; case 5: return gretl_invert_diagonal_matrix(a); case 4: err = real_invert_symmetric_matrix(a, 1, 0); if (err) ...
int gretl_invert_matrix(gretl_matrix *a) { int s, err = 0; if (gretl_is_null_matrix(a)) { return E_DATA; } s = gretl_matrix_get_structure(a); if (s == GRETL_MATRIX_IDENTITY) { return 0; } else if (s == GRETL_MATRIX_DIAGONAL) { err = gretl_invert_diagonal_matrix(a); } else if (s == GRETL_MAT...
gretl_invert_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_packed_symmetric_matrix(gretl_matrix *v) { char uplo; integer info; integer n; int err; gretl_matrix *vcpy; unsigned long v7; v7 = __readfsqword(0x28u); vcpy = 0; uplo = 76; err = 0; if (!v || !v->rows || !v->cols) return 2; if (v->cols == 1) { if (v->rows == 1) { ...
int gretl_invert_packed_symmetric_matrix(gretl_matrix *v) { gretl_matrix *vcpy = NULL; integer info, n; char uplo = 'L'; int err = 0; if (gretl_is_null_matrix(v)) { return E_DATA; } if (v->cols != 1) { fprintf(stderr, "gretl_invert_packed_symmetric_matrix:\n" " matrix is not ...
gretl_invert_packed_symmetric_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_symmetric_indef_matrix(gretl_matrix *a) { char uplo; integer n; integer info; integer lwork; int err; double anorm; double rcond; double *work; integer *ipiv; integer *iwork; unsigned long v12; v12 = __readfsqword(0x28u); uplo = 85; lwork = -1; err = 0; if (!a || !a->ro...
int gretl_invert_symmetric_indef_matrix(gretl_matrix *a) { char uplo = 'U'; integer n, info; integer *ipiv; integer *iwork; integer lwork = -1; double anorm, rcond; double *work; int err = 0; if (gretl_is_null_matrix(a)) { return E_DATA; } if (a->cols != a->rows) { fputs("gretl_invert_sy...
gretl_invert_symmetric_indef_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_symmetric_matrix(gretl_matrix *a) { return real_invert_symmetric_matrix(a, 0, 1); }
int gretl_invert_symmetric_matrix(gretl_matrix *a) { return real_invert_symmetric_matrix(a, 0, 1); }
gretl_invert_symmetric_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_symmetric_matrix2(gretl_matrix *a, double *ldet) { double v3; char uplo; integer n; integer info; int i; int err; double x; unsigned long v10; v10 = __readfsqword(0x28u); uplo = 76; err = 0; if (!a || !a->rows || !a->cols) return 2; if (a->cols == a->rows) { n = a->co...
int gretl_invert_symmetric_matrix2(gretl_matrix *a, double *ldet) { integer n, info; char uplo = 'L'; int i, err = 0; if (gretl_is_null_matrix(a)) { return E_DATA; } if (a->cols != a->rows) { fputs("gretl_invert_symmetric_matrix: input is not square\n", stderr); return E_NONCONF; } n = a-...
gretl_invert_symmetric_matrix2
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invert_triangular_matrix(gretl_matrix *a, char uplo) { char uploa[4]; gretl_matrix *aa; char diag; integer n; integer info; int err; unsigned long v9; aa = a; uploa[0] = uplo; v9 = __readfsqword(0x28u); diag = 78; info = 0; err = 0; if (!a || !aa->rows || !aa->cols) return 2; ...
int gretl_invert_triangular_matrix(gretl_matrix *a, char uplo) { char diag = 'N'; integer n, info = 0; int err = 0; if (gretl_is_null_matrix(a)) { return E_DATA; } n = a->rows; if (a->rows != a->cols) { return E_NONCONF; } dtrtri_(&uplo, &diag, &n, a->val, &n, &info); if (info < 0) { ...
gretl_invert_triangular_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_invpd(gretl_matrix *a) { int v2; char uplo; integer n; integer info; int err; unsigned long v7; v7 = __readfsqword(0x28u); uplo = 76; err = 0; if (a->cols == a->rows) { n = a->cols; if (n == 1) { *a->val = 1.0 / *a->val; return 0; } else { dpotrf_(&uplo, &n, ...
int gretl_invpd(gretl_matrix *a) { integer n, info; char uplo = 'L'; int err = 0; if (a->cols != a->rows) { fputs("gretl_invpd: input is not square\n", stderr); return E_NONCONF; } n = a->cols; if (n == 1) { a->val[0] = 1.0 / a->val[0]; return 0; } dpotrf_(&uplo, &n, a->val, &n, &i...
gretl_invpd
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
double gretl_irr(const double *x, int n, int pd, int *err) { int gotplus; int gotminus; int i; int ia; int m; double PV; double r; double r1; double r0; r1 = 0.02; r0 = -0.02; gotplus = 0; gotminus = 0; m = n; for (i = 0; i < n; ++i) { if (fabs(x[i]) <= 1.797693134862316e308) { ...
double gretl_irr(const double *x, int n, int pd, int *err) { double PV, r, r1 = 0.02, r0 = -0.02; int gotplus = 0, gotminus = 0; int i, m = n; for (i = 0; i < n; i++) { if (na(x[i])) { m--; } else if (x[i] > 0) { gotplus = 1; } else if (x[i] < 0) { gotminus = 1; } } if (!...
gretl_irr
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_arima_model(const MODEL *pmod) { int d; int D; d = gretl_model_get_int(pmod, "arima_d"); D = gretl_model_get_int(pmod, "arima_D"); return d > 0 || D > 0; }
int gretl_is_arima_model(const MODEL *pmod) { int d = gretl_model_get_int(pmod, "arima_d"); int D = gretl_model_get_int(pmod, "arima_D"); return (d > 0 || D > 0); }
gretl_is_arima_model
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_array_type(GretlType type) { return type == GRETL_TYPE_STRINGS || type == GRETL_TYPE_MATRICES || type == GRETL_TYPE_BUNDLES || type == GRETL_TYPE_LISTS || type == GRETL_TYPE_ARRAYS; }
int gretl_is_array_type(GretlType type) { return type == GRETL_TYPE_STRINGS || type == GRETL_TYPE_MATRICES || type == GRETL_TYPE_BUNDLES || type == GRETL_TYPE_LISTS || type == GRETL_TYPE_ARRAYS; }
gretl_is_array_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_arrayable_type(GretlType type) { return type == GRETL_TYPE_STRING || type == GRETL_TYPE_MATRIX || type == GRETL_TYPE_BUNDLE || type == GRETL_TYPE_LIST || type == GRETL_TYPE_ARRAY; }
int gretl_is_arrayable_type(GretlType type) { return type == GRETL_TYPE_STRING || type == GRETL_TYPE_MATRIX || type == GRETL_TYPE_BUNDLE || type == GRETL_TYPE_LIST || type == GRETL_TYPE_ARRAY; }
gretl_is_arrayable_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_ascii(const char *buf) { int a; while (*buf) { a = *buf; if (a == 127 || a <= 31 && a != 9 && a != 10 && a != 13 && a != 26) return 0; ++buf; } return 1; }
int gretl_is_ascii(const char *buf) { int a; while (*buf) { a = *buf; if (a > 126 || (a < 32 && !(ascii_ctrl(a)))) { return 0; } buf++; } return 1; }
gretl_is_ascii
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_between_model(const MODEL *pmod) { return pmod->ci == 93 && (pmod->opt & 2) != 0; }
int gretl_is_between_model(const MODEL *pmod) { if (pmod->ci == PANEL && (pmod->opt & OPT_B)) { return 1; } else { return 0; } }
gretl_is_between_model
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_bundle(const char *name) { return get_user_var_of_type_by_name(name, GRETL_TYPE_BUNDLE) != 0; }
int gretl_is_bundle(const char *name) { return get_user_var_of_type_by_name(name, GRETL_TYPE_BUNDLE) != NULL; }
gretl_is_bundle
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_identity_matrix(const gretl_matrix *m) { int i; int j; double x; if (!m || !m->rows || !m->cols) return 0; if (m->rows != m->cols) return 0; for (j = 0; j < m->cols; ++j) { for (i = 0; i < m->rows; ++i) { x = m->val[j * m->rows + i]; if (i == j && x != 1.0) retu...
int gretl_is_identity_matrix(const gretl_matrix *m) { double x; int i, j; if (gretl_is_null_matrix(m)) { return 0; } else if (m->rows != m->cols) { return 0; } for (j = 0; j < m->cols; j++) { for (i = 0; i < m->rows; i++) { x = gretl_matrix_get(m, i, j); if (i == j && x != 1.0) ...
gretl_is_identity_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_list(const char *name) { return get_user_var_of_type_by_name(name, GRETL_TYPE_LIST) != 0; }
int gretl_is_list(const char *name) { return get_user_var_of_type_by_name(name, GRETL_TYPE_LIST) != NULL; }
gretl_is_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_midas_list(const int *list, const DATASET *dset) { int ret; int i; int m; int p; ret = 0; if (list && *list > 2) { if (!series_is_midas_anchor(dset, list[1])) return 0; m = series_get_midas_period(dset, list[1]); if (!is_valid_midas_frequency_ratio(dset, m) || m != *list) ...
int gretl_is_midas_list(const int *list, const DATASET *dset) { int ret = 0; if (list != NULL && list[0] > 2) { int i, m, p; if (!series_is_midas_anchor(dset, list[1])) { return 0; } m = series_get_midas_period(dset, list[1]); if (!is_valid_midas_frequency_ratio(dset, m) || list[0] != m...
gretl_is_midas_list
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_oprobit_ok(int t1, int t2, const double *x) { double v4; int n; int d; n = 0; d = 1; while (t1 <= t2) { if (fabs(x[t1]) <= 1.797693134862316e308) { ++n; v4 = x[t1]; if (v4 != floor(v4) || x[t1] < 0.0) { d = 0; return d > 0 && n > 0; } } ++t1;...
int gretl_is_oprobit_ok(int t1, int t2, const double *x) { int t, n = 0, d = 1; for (t = t1; t <= t2; t++) { if (na(x[t])) { continue; } n++; if (x[t] != floor(x[t]) || x[t] < 0) { d = 0; break; } } return (d > 0 && n > 0); }
gretl_is_oprobit_ok
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_pkzip_file(const char *fname) { _BOOL4 ret; FILE *fp; char test[3]; unsigned long v5; v5 = __readfsqword(0x28u); memset(test, 0, sizeof(test)); ret = 0; fp = gretl_fopen(fname, "rb"); if (fp) { if (fread(test, 1u, 2u, fp) == 2) ret = strcmp(test, "PK") == 0; fclose(fp); }...
int gretl_is_pkzip_file(const char *fname) { FILE *fp; char test[3] = {0}; int ret = 0; fp = gretl_fopen(fname, "rb"); if (fp != NULL) { if (fread(test, 1, 2, fp) == 2) { if (!strcmp(test, "PK")) ret = 1; } fclose(fp); } return ret; }
gretl_is_pkzip_file
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_public_user_function(const char *name) { ufunc *fun; fun = get_user_function_by_name(name); return fun && (fun->flags & 1) == 0; }
int gretl_is_public_user_function(const char *name) { ufunc *fun = get_user_function_by_name(name); return (fun != NULL && !function_is_private(fun)); }
gretl_is_public_user_function
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_regular_panel_model(const MODEL *pmod) { if (pmod->ci == 88 && gretl_model_get_int(pmod, "pooled")) return 1; if (pmod->ci == 93) return (pmod->opt & 0x108020) != 0; return 0; }
int gretl_is_regular_panel_model(const MODEL *pmod) { if (pmod->ci == OLS && gretl_model_get_int(pmod, "pooled")) { return 1; } else if (pmod->ci != PANEL) { return 0; } else { gretlopt opt = pmod->opt & (OPT_P | OPT_F | OPT_U); return opt != 0; } }
gretl_is_regular_panel_model
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_scalar(const char *name) { _BOOL4 ret; ret = get_user_var_of_type_by_name(name, GRETL_TYPE_DOUBLE) != 0; if (!ret) return const_lookup(name); return ret; }
int gretl_is_scalar(const char *name) { int ret = 0; if (get_user_var_of_type_by_name(name, GRETL_TYPE_DOUBLE) != NULL) { ret = 1; } if (!ret) { ret = const_lookup(name); } return ret; }
gretl_is_scalar
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_scalar_type(GretlType type) { return type == GRETL_TYPE_BOOL || type == GRETL_TYPE_INT || type == GRETL_TYPE_UNSIGNED || type == GRETL_TYPE_DOUBLE; }
int gretl_is_scalar_type(GretlType type) { return type == GRETL_TYPE_BOOL || type == GRETL_TYPE_INT || type == GRETL_TYPE_UNSIGNED || type == GRETL_TYPE_DOUBLE; }
gretl_is_scalar_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_series(const char *name, const DATASET *dset) { int v; if (!dset) return 0; v = series_index(dset, name); return v >= 0 && v < dset->v; }
int gretl_is_series(const char *name, const DATASET *dset) { if (dset == NULL) { return 0; } else { int v = series_index(dset, name); return (v >= 0 && v < dset->v); } }
gretl_is_series
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_series_type(GretlType type) { return type == GRETL_TYPE_SERIES || type == GRETL_TYPE_USERIES; }
int gretl_is_series_type(GretlType type) { return type == GRETL_TYPE_SERIES || type == GRETL_TYPE_USERIES; }
gretl_is_series_type
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_simple_OLS(const MODEL *pmod) { return pmod->ci == 88 && pmod->list && *pmod->list == 3 && !pmod->list[2]; }
int gretl_is_simple_OLS(const MODEL *pmod) { if (pmod->ci == OLS && pmod->list != NULL && pmod->list[0] == 3 && pmod->list[2] == 0) { return 1; } else { return 0; } }
gretl_is_simple_OLS
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_string(const char *name) { const char *namea; namea = name; if (*name == 64 && name[1] != 64) namea = name + 1; return get_user_var_of_type_by_name(namea, GRETL_TYPE_STRING) || get_built_in_string_by_name(namea) != 0; }
int gretl_is_string(const char *name) { if (*name == '@' && *(name + 1) != '@') { name++; } if (get_user_var_of_type_by_name(name, GRETL_TYPE_STRING) != NULL) { return 1; } else if (get_built_in_string_by_name(name) != NULL) { return 1; } else { return 0; } }
gretl_is_string
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_updated(const char *prev_build) { int y; int m; int d; int b_curr; unsigned long v6; v6 = __readfsqword(0x28u); __isoc99_sscanf("2022-07-14", "%d-%d-%d", &y, &m, &d); b_curr = 100 * m + 10000 * y + d; __isoc99_sscanf(prev_build, "%d-%d-%d", &y, &m, &d); return b_curr > 100 * m + 10000 ...
int gretl_is_updated(const char *prev_build) { int b_curr, b_prev; int y, m, d; sscanf(BUILD_DATE, "%d-%d-%d", &y, &m, &d); b_curr = 10000 * y + 100 * m + d; sscanf(prev_build, "%d-%d-%d", &y, &m, &d); b_prev = 10000 * y + 100 * m + d; return b_curr > b_prev; }
gretl_is_updated
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_user_var(const char *name) { return get_user_var_by_name(name) != 0; }
int gretl_is_user_var(const char *name) { return get_user_var_by_name(name) != NULL; }
gretl_is_user_var
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_xml_file(const char *fname) { _BOOL4 ret; gzFile fz; char test[6]; unsigned long v5; v5 = __readfsqword(0x28u); ret = 0; fz = gretl_gzopen(fname, "rb"); if (fz) { if ((unsigned int)gzread(fz, test, 5)) { test[5] = 0; ret = strcmp(test, "<?xml") == 0; } gzclose(fz); ...
int gretl_is_xml_file(const char *fname) { gzFile fz; char test[6]; int ret = 0; fz = gretl_gzopen(fname, "rb"); if (fz != Z_NULL) { if (gzread(fz, test, 5)) { test[5] = '\0'; if (!strcmp(test, "<?xml")) ret = 1; } gzclose(fz); } gretl_error_clear(); return ret; }
gretl_is_xml_file
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_is_zero_matrix(const gretl_matrix *m) { int i; if (!m || !m->rows || !m->cols) return 0; for (i = 0; i < m->rows * m->cols; ++i) { if (m->val[i] != 0.0) return 0; } return 1; }
int gretl_is_zero_matrix(const gretl_matrix *m) { int i, n; if (gretl_is_null_matrix(m)) { return 0; } n = m->rows * m->cols; for (i = 0; i < n; i++) { if (m->val[i] != 0.0) { return 0; } } return 1; }
gretl_is_zero_matrix
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0
int gretl_isconst(int t1, int t2, const double *x) { int t; int ret; ret = 1; while (fabs(x[t1]) > 1.797693134862316e308 && t1 <= t2) ++t1; if (t1 >= t2) return 0; for (t = t1 + 1; t <= t2; ++t) { if (fabs(x[t]) <= 1.797693134862316e308 && fabs(x[t] - x[t1]) > 2.220446049250313e-16) ...
int gretl_isconst(int t1, int t2, const double *x) { int t, ret = 1; while (na(x[t1]) && t1 <= t2) { t1++; } if (t1 >= t2) { return 0; } for (t = t1 + 1; t <= t2; t++) { if (na(x[t])) { continue; } if (floatneq(x[t], x[t1])) { ret = 0; break; } } return ret;...
gretl_isconst
gretl-2021d
sci-mathematics
O0/sci-mathematics/gretl-2021d/libgretl-1.0.so.40.0.0
ida
O0