mirror of git://gcc.gnu.org/git/gcc.git
cmath (fmod(_Tp, _Up)): Add.
2011-08-12 Paolo Carlini <paolo.carlini@oracle.com> * include/c_global/cmath (fmod(_Tp, _Up)): Add. * include/c_std/cmath: Likewise. From-SVN: r177698
This commit is contained in:
parent
6c32ee7449
commit
e02d979a34
|
@ -1,3 +1,8 @@
|
||||||
|
2011-08-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
* include/c_global/cmath (fmod(_Tp, _Up)): Add.
|
||||||
|
* include/c_std/cmath: Likewise.
|
||||||
|
|
||||||
2011-08-11 Paolo Carlini <paolo.carlini@oracle.com>
|
2011-08-11 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* include/std/future: constexpr functions are implicitly inline.
|
* include/std/future: constexpr functions are implicitly inline.
|
||||||
|
|
|
@ -282,6 +282,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
fmod(long double __x, long double __y)
|
fmod(long double __x, long double __y)
|
||||||
{ return __builtin_fmodl(__x, __y); }
|
{ return __builtin_fmodl(__x, __y); }
|
||||||
|
|
||||||
|
template<typename _Tp, typename _Up>
|
||||||
|
inline _GLIBCXX_CONSTEXPR
|
||||||
|
typename __gnu_cxx::__promote_2<
|
||||||
|
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
|
||||||
|
&& __is_arithmetic<_Up>::__value,
|
||||||
|
_Tp>::__type, _Up>::__type
|
||||||
|
fmod(_Tp __x, _Up __y)
|
||||||
|
{
|
||||||
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
||||||
|
return fmod(__type(__x), __type(__y));
|
||||||
|
}
|
||||||
|
|
||||||
using ::frexp;
|
using ::frexp;
|
||||||
|
|
||||||
inline _GLIBCXX_CONSTEXPR float
|
inline _GLIBCXX_CONSTEXPR float
|
||||||
|
|
|
@ -268,6 +268,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
fmod(long double __x, long double __y)
|
fmod(long double __x, long double __y)
|
||||||
{ return __builtin_fmodl(__x, __y); }
|
{ return __builtin_fmodl(__x, __y); }
|
||||||
|
|
||||||
|
template<typename _Tp, typename _Up>
|
||||||
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value
|
||||||
|
&& __is_integer<_Up>::__value,
|
||||||
|
double>::__type
|
||||||
|
fmod(_Tp __x, _Up __y)
|
||||||
|
{ return __builtin_fmod(__x, __y); }
|
||||||
|
|
||||||
using ::frexp;
|
using ::frexp;
|
||||||
|
|
||||||
inline float
|
inline float
|
||||||
|
|
Loading…
Reference in New Issue