/*============================================================================= This file is part of ARB. ARB is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ARB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ARB; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =============================================================================*/ /****************************************************************************** Copyright (C) 2013 Fredrik Johansson ******************************************************************************/ #ifndef ELEFUN_H #define ELEFUN_H #include "fmprb.h" #include "fmpz_extras.h" static __inline__ void fmpz_print_fixed(const fmpz_t x, long prec) { fmpr_t t; fmpr_init(t); fmpr_set_fmpz(t, x); fmpr_mul_2exp_si(t, t, -prec); fmpr_printd(t, prec / 3.33); fmpr_clear(t); } #define EXP_CACHE_PREC 1024 #define EXP_CACHE_BITS 8 #define EXP_CACHE_NUM (1L<