[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GMP bignum results using double cells.
From: |
Rob Browning |
Subject: |
Re: GMP bignum results using double cells. |
Date: |
Thu, 27 Feb 2003 11:16:52 -0600 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) |
Rob Browning <address@hidden> writes:
>> Do we need to define scm_t_big_mpz in numbers.h? Couldn't it just be
>> an declared-but-undefined struct there? Like
>
> Possibly. In the first pass, I was just matching what the other types
> did, but this will probably work. I'll try it.
Ahh, that's why -- in gc-card.c, we have to call mpz_clear
(SCM_I_BIG_MPZ (x)). I'd put the direct call in there just for
efficiency, and I also used direct manipulations in a few other places
(dealing with the ipv6 addresses and random number generation I
think).
So would you prefer: SCM_CELL_ADDR_1, putting the scm_t_big_mpz in
numbers.h, or just adding functions to the scm_i_big interface for any
non-numbers.c usages of bignums, even libguile internal ones. The
latter would of course have more overhead, but it might not be
enough to be significant.
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4