// -*- mode:C++ ; compile-command: "g++ -I.. -g -c -DHAVE_CONFIG_H -DIN_GIAC gen.cc" -*-
/*
* Copyright (C) 2001,2014 B. Parisse, Institut Fourier, 38402 St Martin d'Heres
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see .
*/
#ifndef _GIAC_GEN_H
#define _GIAC_GEN_H
/* Warning: the size of a gen depend on the architecture and of compile-time flags
Define -DSMARTPTR64 on 64 bit CPU if the pointers allocated by new are 48 bits
this will make sizeof(gen)==8 instead of 16
Currently the address of pointers is obtained by using the reserved and val fields
(48 bits) and adding 00 for the most significant bits
On systems that use pointers above 0x00ffffffff it might be better to use a table
of most significants 32 bits addresses (refered by the reserved field)
and use the val field for offset.
Define -DDOUBLEVAL if you did not define SMARTPTR64 and want full double precision
(53 bit mantissa). Otherwise, the 8 less significant bits will be used for the type
field of a gen, i.e. 0x01 for a double, hence 45 bit mantissa will be used for doubles
Using full double precision increases sizeof(gen) to 12 on a 32 bits CPU
(and 16 on a 64 bits CPU)
*/
// FIXME: macros defined in config.h are not welcome in a public header!
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "first.h"
// #include
#ifdef USE_GMP_REPLACEMENTS
#undef HAVE_GMPXX_H
#undef HAVE_LIBMPFR
#endif
#ifdef HAVE_GMPXX_H
#include
#endif
#ifdef HAVE_LIBMPFR
#include
// #include
#endif
#ifdef HAVE_LIBMPFI
#include
#endif
#include
#include
#include "vector.h"
#include