[Bug libstdc++/50880] __complex_acosh() picks wrong complex branch
gdr at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 12:50:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50880
--- Comment #18 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2011-11-02 12:48:47 UTC ---
(In reply to comment #16)
> Well, I guess this would be most of it:
>
> template<typename _Tp>
> std::complex<_Tp>
> __complex_acosh(const std::complex<_Tp>& __z)
> {
> return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
> + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
> }
looks good -- hoping for log implementation to do the right thing.
More information about the Gcc-bugs
mailing list