guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mpz_import


From: Andreas Vögele
Subject: Re: mpz_import
Date: Tue, 31 Aug 2004 09:47:56 +0200

Andreas Vögele wrote:

Marius Vollmer writes:

Andreas Vögele <address@hidden> writes:

Marius Vollmer writes:

[...]  I was thinking whether we should export something like
mpz_import and mpz_export for our integers in general.  Such an
operation is obviously needed sometimes.

I think that's a good idea.  I could, for example, use such wrappers
to convert message digests into bigints. Currently, I use scm_ash and
scm_sum in a loop to convert MD5 hashes into numbers.

Yes, that sounds the prototypical application.  Maybe you have a
concrete suggestion of how Guile should offer these functions (i.e.,
documented function prototypes)?  That would be great.

I'd include <gmp.h> in libguile/numbers.h [...]

I've just encountered problems with gmp.h (from GNU MP 4.1.2) when building C++ programs with GCC 2.95. For me it's more important to be able to build C++ programs with GCC 2.95 than to be able to convert variables of type mpz_t directly into Scheme numbers. I can live with scm_sum and scm_ash. Let's forget about scm_from_mpz_t and scm_to_mpz_t for the time being.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]