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⁡π−log⁡Γ(z)+log⁡Γ(1−z)S(z) = \log \pi - \log \Gamma(z) + \log \Gamma(1 - z), the branch of log⁡sin⁡(πz)\log \sin(\pi z) used by the reflection formula of log⁡Γ\log \Gamma.

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

S(z)=log⁡(sin⁡(π(z−n)))∓nπi,n=⌊Re⁡z⌋,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≤π0 < \arg z \le \pi (the union of both cases is computed when arg⁡z\arg z is not determined). After subtracting nn, 0≤Re⁡z<10 \le \operatorname{Re} z < 1, and S(z)=log⁡sin⁡(πz)S(z) = \log \sin(\pi z) is used if the imaginary part is small; otherwise S(z)=iπ(z−1/2)+log⁡((1+e−2πiz)/2)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)S'(z), so that the result changes continuously when zz is not real and nn 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-11-02).