FLINT3.7.0-dev

vec1d_reduce_pm1no_to_0n, vec4d_reduce_pm1no_to_0n, vec8d_reduce_pm1no_to_0n

Synopsis#include <flint/machine_vectors.h>
vec1d vec1d_reduce_pm1no_to_0n(vec1d a, vec1d n)source
vec4d vec4d_reduce_pm1no_to_0n(vec4d a, vec4d n)
vec8d vec8d_reduce_pm1no_to_0n(vec8d a, vec8d n)

Returns a \bmod n in [0, n) for a \in (-n, n), by adding n to negative lanes. The vec4d and vec8d versions on AVX2 test the sign bit, so they map -0.0 to n; the others return -0.0. AVX2 and NEON.

Cite this page

The FLINT team, “vec1d_reduce_pm1no_to_0n, vec4d_reduce_pm1no_to_0n, vec8d_reduce_pm1no_to_0n (machine_vectors.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/machine_vectors/vec1d_reduce_pm1no_to_0n.html (generated 2026-10-20).