FLINT3.7.0-dev

n_divisible_odd_gm

Synopsis#include <flint/ulong_extras.h>
int n_divisible_odd_gm(ulong n, ulong inv1, ulong inv2)source

Returns whether the odd number dd divides nn, given inv1=d−1 mod B\mathit{inv1} = d^{-1} \bmod B and inv2=⌊(B−1)/d⌋\mathit{inv2} = \lfloor (B - 1)/d \rfloor. Costs one multiplication. See Divisibility testing by multiplication.

Cite this page

The FLINT team, “n_divisible_odd_gm (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_divisible_odd_gm.html (generated 2026-11-02).