Low and high mpn multiplication
GMP doesn't provide a public mpn_mullow or mpn_mulhigh. These functions would be useful for mullow_KS and mulhigh_KS (and in other places).
There are mulhigh, sqrhigh and divhigh functions in MPFR (mpfr/mulders.c). Calling these functions directly is maybe not the best idea since they are MPFR-internal and the interface could change, but I already use them Arb and this hasn't caused trouble so far. We could steal the code, but newer versions of MPFR are not license-compatible LGPL 3.1 so we'd have to copy code from an old version of MPFR unless we ask permission. Unfortunately, the MPFR functions assume that all inputs have the same length as the output; something that doesn't require zero-padding would be better.
Mulhigh works OK now (but can still be improved).
We should add flint_mpn_mullow_n as well.
One of the applications is in flint_mpn_mod_preinvn, flint_mpn_divrem_preinvn flint_mpn_mulmod_preinvn. Here the reduction currently does do two full multiplications where the first can be replaced by a mulhigh and the second by a mullow. It looks like we actually read n + 1 limbs of output after the low product, so one would need a carry-out limb? Hmm.
flint_mpn_mullow_basecase is now implemented, so only higher cases left to do here.