complex (arg): Use std::signbit only when available.
2010-02-22 Paolo Carlini <paolo.carlini@oracle.com> * include/tr1_impl/complex (arg): Use std::signbit only when available. From-SVN: r156972
This commit is contained in:
parent
15d81a3c31
commit
26504a0f8c
@ -1,3 +1,8 @@
|
||||
2010-02-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* include/tr1_impl/complex (arg): Use std::signbit only when
|
||||
available.
|
||||
|
||||
2010-02-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* include/bits/functional_hash.h (hash<string>, hash<wstring>,
|
||||
|
@ -311,8 +311,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
arg(_Tp __x)
|
||||
{
|
||||
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
||||
#if (_GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC)
|
||||
return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L)
|
||||
: __type();
|
||||
#else
|
||||
return std::arg(std::complex<__type>(__x));
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename _Tp>
|
||||
|
Loading…
Reference in New Issue
Block a user