a question

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Wed Feb 20 22:02:51 CET 2013


Ciao,

Il Mer, 20 Febbraio 2013 6:05 pm, Timothee Ewart ha scritto:
> My lib works well, but I have something really bad, the signed
> determination of a signed extended multiplication (n bit * n bit = 2n
> bit).

> What is your method to calculate an extended signed multiplication for
> integer represented by the  two complement method ? But maybe you do not
> use the two complement representation.

As you can see from the manual, we "represent integers using sign and
magnitude". [ gmplib.org/manual/Integer-Internals.html ]

We sometime use two complement representation for big-integers internally,
for intermediate values of complex functions, where we know in advance
that we can perform computations modulo some determined 2^n... i.e. where
we can use unsigned "n bit * m bit = n bit" multiplications, discarding
everything above the modulus.

Regards,
m

-- 
http://bodrato.it/software/strassen.html



More information about the gmp-discuss mailing list