fmpq_harmonic_ui, _fmpq_harmonic_ui
Synopsis
#include <flint/fmpq.h>Values whose numerator and denominator fit in a word ( on a 64-bit machine) are read from a table. For larger the function uses recursively, which gives every odd a weight that depends only on the dyadic range , and sums the weighted odd terms by Binary splitting and product trees, accumulating word-size partial sums in the base case. A final GCD puts the result in lowest terms. The cost is bit operations.
Cite this page
The FLINT team, “fmpq_harmonic_ui, _fmpq_harmonic_ui (fmpq.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq/fmpq_harmonic_ui.html (generated 2026-11-02).
@misc{flint-doc-fmpq-fmpq-harmonic-ui,
author = {{The FLINT team}},
title = {{fmpq\_harmonic\_ui, \_fmpq\_harmonic\_ui (fmpq.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq/fmpq_harmonic_ui.html},
note = {Generated 2026-11-02}
}