FLINT3.7.0-dev

n_cdiv, n_round_up, n_round_down

Synopsis#include <flint/fft_small.h>
ulong n_cdiv(ulong a, ulong b)source
ulong n_round_up(ulong a, ulong b)source
ulong n_round_down(ulong a, ulong b)source

Return \lceil a/b \rceil, b \lceil a/b \rceil and b \lfloor a/b \rfloor. The first two compute a + b - 1 and are wrong if it overflows.

Guides#

Cite this page

The FLINT team, “n_cdiv, n_round_up, n_round_down (fft_small.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fft_small/n_cdiv.html (generated 2026-10-20).