1 /* mpn_mu_bdiv_qr -- divide-and-conquer Hensel division using a variant of 2 Barrett's algorithm, returning quotient and remainder. 3 4 THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS 5 ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS 6 ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP 7 RELEASE. 8 9 Copyright 2005, 2006, 2007 Free Software Foundation, Inc. 10 11 This file is part of the GNU MP Library. 12 13 The GNU MP Library is free software; you can redistribute it and/or modify 14 it under the terms of the GNU Lesser General Public License as published by 15 the Free Software Foundation; either version 3 of the License, or (at your 16 option) any later version. 17 18 The GNU MP Library is distributed in the hope that it will be useful, but 19 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 20 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 21 License for more details. 22 23 You should have received a copy of the GNU Lesser General Public License 24 along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ 25 26 #include "gmp.h" 27 #include "gmp-impl.h" 28 29 30 /* Computes Hensel binary division of {np, 2*n} by {dp, n}. 31 32 Output: 33 34 q = n * d^{-1} mod 2^{qn * GMP_NUMB_BITS}, 35 36 r = (n - q * d) * 2^{-qn * GMP_NUMB_BITS} 37 38 Stores q at qp. Stores the n least significant limbs of r at the high half 39 of np, and returns the borrow from the subtraction n - q*d. 40 41 d must be odd. dinv is (-d)^-1 mod 2^GMP_NUMB_BITS. */ 42 43 void 44 mpn_mu_bdiv_qr (mp_ptr qp, 45 mp_ptr rp, 46 mp_srcptr np, mp_size_t nn, 47 mp_srcptr dp, mp_size_t dn, 48 mp_ptr scratch) 49 { 50 ASSERT_ALWAYS (0); 51 } 52