[Top][All Lists]

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


From: sundaresh venugopal
Subject: Division
Date: Fri, 06 May 2005 09:07:34 -0500

Your lirary is excellent.I am using it for data compression and I mainly use 
integer arithmetic.
There is one feature that I would like to request.This concerns the function,


In the general version, R is of type mpz_t.It would be nice to have one similar 
function where
R is of type pointer to unsigned long since D is of type unsigned long the 
remainder will always be less than
D.Now I have to do, say

    mpz_fdiv_qr_ui(c,r,c,d); and then
    o = mpz_get_ui(r);
    x = o / 32;
    y = o % 32;

       and so on.Instead if I could just,

mpz_fdiv_qr_ui(c,r,c,&o,d) in one shot, it would be helpful.Thanks.

Also, I am sure that the algorithms used in this library must be very 
efficient,but I designed an integer division algorithm
which appeared to be very fast.You might probably be aware of it,I do'nt know 
but nonetheless,if you would care to look at it,
I can just email it to whoever concerned.I was not aware of gmp though I use 
linux, and I was contemplating developing algorithms
for arithmetic on extended integers,for my compression algorithms, so I devised 
this division algorithm.Then I stumbled across gmp
and scrapped the idea for developing my own arithmetic library.

Sign-up for Ads Free at Mail.com

reply via email to

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