[Top][All Lists]

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

Re: GMP code committed -- watch for bugs.

From: Kevin Ryde
Subject: Re: GMP code committed -- watch for bugs.
Date: Mon, 07 Apr 2003 08:50:42 +1000
User-agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux)

Rob Browning <address@hidden> writes:
> There may well be bugs

A small one in (gcd n 0), test and possible fix below.  The result
should of course be abs(n) but mpz_gcd_ui can't return that if it
doesn't fit a ulong.

> where
> special casing with GMP operations could help, but it'll probably take
> some good benchmarking to know for sure.

ash (mentioned in the comments) would definitely benefit from the mpz
2exp functions.

In gcd, it'd be nice for the inum/bignum case to share code with the
bignum/inum case, like lcm does.

Attachment: numbers.test.gcd-n-0.diff
Description: Text document

Attachment: numbers.c.gcd-n-0.diff
Description: Text document

reply via email to

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