sqrt algorithm

Torbjörn Granlund tg at gmplib.org
Thu Aug 13 13:00:12 UTC 2015


    Current implementation of both mullo and sqrlo do write n limbs only,
    possibly by full 2n product in a temporary area followed by MPN_COPY.
    
Doing an MPN_COPY in *_basecase is of course not allowable for
efficiency reasons.

    IIRC someone proposed the interface mullo(res, x, y, n, tmp); with 2n
    limbs in tmp, supporting res == tmp, but we never switched to it.
    
It seems mpn_dc_mullo_n implements that exact interface.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list