/**************************************************************************** ** *W float.c GAP source Laurent Bartholdi ** *Y Copyright (C) 2008-2012 Laurent Bartholdi ** ** This file contains the main dll of the float package. ** It defers to mpfr.c, mpfi.c etc. for initialization
*/ #undef TRACE_ALLOC
// HACK HACK HACK: workaround an issue where atexit() calls are inserted by // the compiler into C++ code compiled with coverage tracking (via the // --coverage compiler and linker option); this then causes a linker error // when trying to load float.so on Linux with glibc, where atexit() is not // exported by libc.so. int atexit(void (*func)(void))
{ return 0;
}
/**************************************************************** * convert long GAP integer to gmp signed integers and back: * mpz (malloc'ed) or MPZ (on GAP heap) * in the current gmp implementation, we put mpz's as follows: * +------------+------------+------------+------------+--- * | _mp_alloc | _mp_size | _mp_d ---+--> limb0 | limb1 * +------------+------------+------------+------------+---
****************************************************************/
Obj MPZ_LONGINT (Obj obj) {
Obj f;
mpz_ptr p; int s;
f = NewBag(T_DATOBJ,SIZE_OBJ(obj)+sizeof(__mpz_struct));
p = mpz_MPZ(f);
s = SIZE_INT(obj);
p->_mp_alloc = s;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.