Loïc Grenié on Tue, 04 Feb 2014 14:49:09 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Interfacing pari and gmp/mpfr/mpc |
2014-02-04 Andreas Enge <andreas.enge@inria.fr>: > Hello, > > finally I finished some work started during the Atelier Pari/GP in January. > The attached package allows to switch between pari and gmp/mpfr/mpc types in > a C program, to use the pari stack functions for allocating the mantissae > of mpfr/mpc numbers, and to call functions from libraries relying on mpfr/mpc > (in particular, the libraries themselves) in the GP command interpreter. > > Comments are welcome. I tested against the current git of Pari/GP; the > package does not work with the stable version of Pari/GP. > > I kept names such as mpz_set_GEN and mpz_get_GEN, thus invading foreign > name spaces: These would be the names used inside GMP if it depended on > libpari and contained the corresponding functionality. There is little risk > the names would be used for anything else. Hello Andreas, sorry to ask a stupid question, but since mp*_[sg]et_GEN are symmetric of one another, why not define them either mp*_get_GEN GEN_get_mp* to symmetrically invade name spaces or GEN_set_mp* GEN_get_mp* if the multiprecision library is too picky about its name space ? Loïc