d_mul_2exp, d_mul_2exp_inrange, d_mul_2exp_inrange2
#include <flint/double_extras.h>double d_mul_2exp(double x, int i)sourcedouble d_mul_2exp_inrange(double x, int i)sourcedouble d_mul_2exp_inrange2(double x, int i)sourceReturn . The result is exact unless it overflows or is subnormal. d_mul_2exp accepts any and calls ldexp when is not a normal double. The other two are faster special cases with unchecked preconditions.
d_mul_2exp_inrange requires . It builds the double from its bit pattern and performs one multiplication, so overflow, underflow and special values of behave as for an ordinary multiplication.
d_mul_2exp_inrange2 adds to the exponent field of with an integer addition. It additionally requires that and are normal doubles, in particular ; otherwise the result is meaningless. The preconditions of both functions are checked only in builds configured with --enable-assert.
The FLINT team, “d_mul_2exp, d_mul_2exp_inrange, d_mul_2exp_inrange2 (double_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/double_extras/d_mul_2exp.html (generated 2026-11-02).
@misc{flint-doc-double-extras-d-mul-2exp,
author = {{The FLINT team}},
title = {{d\_mul\_2exp, d\_mul\_2exp\_inrange, d\_mul\_2exp\_inrange2 (double\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/double_extras/d_mul_2exp.html},
note = {Generated 2026-11-02}
}