using mpn_preinv_divrem_1
    Torbjorn Granlund 
    tege at swox.com
       
    Thu Sep  1 11:44:01 CEST 2005
    
    
  
Ashod Nakashian <saghmos at xter.net> writes:
  I've been reading the mpf_div_ui() code and was surprised to find out 
  that even though tune was enabling preinv division, the code was NOT 
  using the mpn_preinv_divrem_1 function.
  
It doesn't, since a precomputed value is not available.
In mpn_get_str, the divisors are invariant, which allows us to
table preinverted divisors.  That is what mpn_preinv_divrem_1 is
designed for.
In other cases, mpn_divrem_1 computes the inverse on-the-fly (for
machines where that helps).
-- 
Torbjörn
    
    
More information about the gmp-discuss
mailing list