Functions variants

Daniele Varrazzo daniele.varrazzo at gmail.com
Mon Mar 21 10:00:38 CET 2011


Hello,

many mpz function are available with more than one signatures: taking
only mpz arguments and taking one of them as long (eventually
unsigned).

Writing the PostgreSQL binding, until now we have wrapped many of them
into database operators/functions, but only in the mpz-mpz flavour
(http://pgmp.projects.postgresql.org/mpz.html) and I have to decide
what to do when multiple signature are available.

Are the _ui variants of the functions just a convenience wrapper to
simplify writing C code without allocation/initialization of one of
the arguments, or are they wrapper for a implementation faster than
the algorithms used in the more generic case?

Thank you,

-- Daniele


More information about the gmp-discuss mailing list