GMP division plans

Paul Leyland paul at leyland.vispa.com
Tue Apr 4 20:45:43 CEST 2006


On Mon, 2006-04-03 at 10:40, Alexander Kruppa wrote:
> Chris Saunders wrote:
> > Could I ask what the other operations would be?
> > 
> > Regards
> > Chris Saunders
> 
> I think getting rid of division is a really great idea, partially 
> defined functions are just a terrible annoyance. Division should be 
> allowed by units (1, -1) at most.
> 
> I would like to suggest that we also abolish squaring. Non-injective 
> functions are an annoyance, too. Torbjörn, could GMP's multiply 
> functions check if the two operands are identical and abort if they are?

And if you really, *really* want squaring then it can be very easily
implemented as  n^2 = (n+1)(n-1) + 1.  Sounds good to me.  Increments
and decrements are very cheap operations.

Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://gmplib.org/list-archives/gmp-discuss/attachments/20060404/5c9872b9/attachment.bin


More information about the gmp-discuss mailing list