https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111726
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #2) > We should use the non-standard but thread-safe lgamma_r if available. And if not available, we can use std::log(std::abs(std::tgamma(x))).