I cannot repro a segfault, but then I might not be using the same GMP release as you. But your test case does indeed show a bug with floating point input in bases which are a power of two and have many leading zeros. Here is a patch: https://gmplib.org/repo/gmp/raw-rev/0fe70584021b Please apply it and report back. -- Torbjörn Please encrypt, key id 0xC8601622