FLINT3.7.0-dev

acb_log_sin_pi

Synopsis#include <flint/acb.h>
void acb_log_sin_pi(acb_t res, const acb_t z, slong prec)source

Sets res to the logarithmic sine function S(z) = \log \pi - \log \Gamma(z) + \log \Gamma(1 - z), the branch of \log \sin(\pi z) used by the reflection formula of \log \Gamma.

Equivalently, S(z) = \int_{1/2}^z \pi \cot(\pi t)\, dt with the path through the upper half plane if 0 < \arg z \le \pi and through the lower half plane otherwise, or

S(z) = \log(\sin(\pi(z - n))) \mp n \pi i, \quad n = \lfloor \operatorname{Re} z \rfloor,

with the negative sign if 0 < \arg z \le \pi (the union of both cases is computed when \arg z is not determined). After subtracting n, 0 \le \operatorname{Re} z < 1, and S(z) = \log \sin(\pi z) is used if the imaginary part is small; otherwise S(z) = i \pi (z - 1/2) + \log((1 + e^{-2 \pi i z})/2) in the lower half plane and the conjugate expression in the upper half plane, which avoid overflow. The function is evaluated at the midpoint and the propagated error is bounded with S'(z), so that the result changes continuously when z is not real and n is not determined.

Guides#

Cite this page

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