2006-02-07 14:14:03 +01:00
|
|
|
// TR1 cmath -*- C++ -*-
|
|
|
|
|
2012-03-14 18:08:03 +01:00
|
|
|
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
2011-02-12 19:30:50 +01:00
|
|
|
// Free Software Foundation, Inc.
|
2006-02-07 14:14:03 +01:00
|
|
|
//
|
|
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
|
|
// software; you can redistribute it and/or modify it under the
|
|
|
|
// terms of the GNU General Public License as published by the
|
2009-04-09 17:00:19 +02:00
|
|
|
// Free Software Foundation; either version 3, or (at your option)
|
2006-02-07 14:14:03 +01:00
|
|
|
// any later version.
|
|
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
// permissions described in the GCC Runtime Library Exception, version
|
|
|
|
// 3.1, as published by the Free Software Foundation.
|
2006-02-07 14:14:03 +01:00
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// You should have received a copy of the GNU General Public License and
|
|
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
2006-02-07 14:14:03 +01:00
|
|
|
|
2006-12-06 00:24:07 +01:00
|
|
|
/** @file tr1/cmath
|
2006-02-07 14:14:03 +01:00
|
|
|
* This is a TR1 C++ Library header.
|
|
|
|
*/
|
|
|
|
|
2007-06-01 01:37:56 +02:00
|
|
|
#ifndef _GLIBCXX_TR1_CMATH
|
|
|
|
#define _GLIBCXX_TR1_CMATH 1
|
2006-02-07 14:14:03 +01:00
|
|
|
|
2007-06-01 01:37:56 +02:00
|
|
|
#pragma GCC system_header
|
2006-02-07 14:14:03 +01:00
|
|
|
|
2007-06-01 01:37:56 +02:00
|
|
|
#include <cmath>
|
|
|
|
|
2010-11-02 19:51:23 +01:00
|
|
|
#ifdef _GLIBCXX_USE_C99_MATH_TR1
|
|
|
|
|
|
|
|
#undef acosh
|
|
|
|
#undef acoshf
|
|
|
|
#undef acoshl
|
|
|
|
#undef asinh
|
|
|
|
#undef asinhf
|
|
|
|
#undef asinhl
|
|
|
|
#undef atanh
|
|
|
|
#undef atanhf
|
|
|
|
#undef atanhl
|
|
|
|
#undef cbrt
|
|
|
|
#undef cbrtf
|
|
|
|
#undef cbrtl
|
|
|
|
#undef copysign
|
|
|
|
#undef copysignf
|
|
|
|
#undef copysignl
|
|
|
|
#undef erf
|
|
|
|
#undef erff
|
|
|
|
#undef erfl
|
|
|
|
#undef erfc
|
|
|
|
#undef erfcf
|
|
|
|
#undef erfcl
|
|
|
|
#undef exp2
|
|
|
|
#undef exp2f
|
|
|
|
#undef exp2l
|
|
|
|
#undef expm1
|
|
|
|
#undef expm1f
|
|
|
|
#undef expm1l
|
|
|
|
#undef fdim
|
|
|
|
#undef fdimf
|
|
|
|
#undef fdiml
|
|
|
|
#undef fma
|
|
|
|
#undef fmaf
|
|
|
|
#undef fmal
|
|
|
|
#undef fmax
|
|
|
|
#undef fmaxf
|
|
|
|
#undef fmaxl
|
|
|
|
#undef fmin
|
|
|
|
#undef fminf
|
|
|
|
#undef fminl
|
|
|
|
#undef hypot
|
|
|
|
#undef hypotf
|
|
|
|
#undef hypotl
|
|
|
|
#undef ilogb
|
|
|
|
#undef ilogbf
|
|
|
|
#undef ilogbl
|
|
|
|
#undef lgamma
|
|
|
|
#undef lgammaf
|
|
|
|
#undef lgammal
|
|
|
|
#undef llrint
|
|
|
|
#undef llrintf
|
|
|
|
#undef llrintl
|
|
|
|
#undef llround
|
|
|
|
#undef llroundf
|
|
|
|
#undef llroundl
|
|
|
|
#undef log1p
|
|
|
|
#undef log1pf
|
|
|
|
#undef log1pl
|
|
|
|
#undef log2
|
|
|
|
#undef log2f
|
|
|
|
#undef log2l
|
|
|
|
#undef logb
|
|
|
|
#undef logbf
|
|
|
|
#undef logbl
|
|
|
|
#undef lrint
|
|
|
|
#undef lrintf
|
|
|
|
#undef lrintl
|
|
|
|
#undef lround
|
|
|
|
#undef lroundf
|
|
|
|
#undef lroundl
|
|
|
|
#undef nan
|
|
|
|
#undef nanf
|
|
|
|
#undef nanl
|
|
|
|
#undef nearbyint
|
|
|
|
#undef nearbyintf
|
|
|
|
#undef nearbyintl
|
|
|
|
#undef nextafter
|
|
|
|
#undef nextafterf
|
|
|
|
#undef nextafterl
|
|
|
|
#undef nexttoward
|
|
|
|
#undef nexttowardf
|
|
|
|
#undef nexttowardl
|
|
|
|
#undef remainder
|
|
|
|
#undef remainderf
|
|
|
|
#undef remainderl
|
|
|
|
#undef remquo
|
|
|
|
#undef remquof
|
|
|
|
#undef remquol
|
|
|
|
#undef rint
|
|
|
|
#undef rintf
|
|
|
|
#undef rintl
|
|
|
|
#undef round
|
|
|
|
#undef roundf
|
|
|
|
#undef roundl
|
|
|
|
#undef scalbln
|
|
|
|
#undef scalblnf
|
|
|
|
#undef scalblnl
|
|
|
|
#undef scalbn
|
|
|
|
#undef scalbnf
|
|
|
|
#undef scalbnl
|
|
|
|
#undef tgamma
|
|
|
|
#undef tgammaf
|
|
|
|
#undef tgammal
|
|
|
|
#undef trunc
|
|
|
|
#undef truncf
|
|
|
|
#undef truncl
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
2010-11-02 19:51:23 +01:00
|
|
|
{
|
|
|
|
namespace tr1
|
|
|
|
{
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
|
2010-11-02 19:51:23 +01:00
|
|
|
#if _GLIBCXX_USE_C99_MATH_TR1
|
|
|
|
|
|
|
|
// types
|
|
|
|
using ::double_t;
|
|
|
|
using ::float_t;
|
|
|
|
|
|
|
|
// functions
|
|
|
|
using ::acosh;
|
|
|
|
using ::acoshf;
|
|
|
|
using ::acoshl;
|
|
|
|
|
|
|
|
using ::asinh;
|
|
|
|
using ::asinhf;
|
|
|
|
using ::asinhl;
|
|
|
|
|
|
|
|
using ::atanh;
|
|
|
|
using ::atanhf;
|
|
|
|
using ::atanhl;
|
|
|
|
|
|
|
|
using ::cbrt;
|
|
|
|
using ::cbrtf;
|
|
|
|
using ::cbrtl;
|
|
|
|
|
|
|
|
using ::copysign;
|
|
|
|
using ::copysignf;
|
|
|
|
using ::copysignl;
|
|
|
|
|
|
|
|
using ::erf;
|
|
|
|
using ::erff;
|
|
|
|
using ::erfl;
|
|
|
|
|
|
|
|
using ::erfc;
|
|
|
|
using ::erfcf;
|
|
|
|
using ::erfcl;
|
|
|
|
|
|
|
|
using ::exp2;
|
|
|
|
using ::exp2f;
|
|
|
|
using ::exp2l;
|
|
|
|
|
|
|
|
using ::expm1;
|
|
|
|
using ::expm1f;
|
|
|
|
using ::expm1l;
|
|
|
|
|
|
|
|
using ::fdim;
|
|
|
|
using ::fdimf;
|
|
|
|
using ::fdiml;
|
|
|
|
|
|
|
|
using ::fma;
|
|
|
|
using ::fmaf;
|
|
|
|
using ::fmal;
|
|
|
|
|
|
|
|
using ::fmax;
|
|
|
|
using ::fmaxf;
|
|
|
|
using ::fmaxl;
|
|
|
|
|
|
|
|
using ::fmin;
|
|
|
|
using ::fminf;
|
|
|
|
using ::fminl;
|
|
|
|
|
|
|
|
using ::hypot;
|
|
|
|
using ::hypotf;
|
|
|
|
using ::hypotl;
|
|
|
|
|
|
|
|
using ::ilogb;
|
|
|
|
using ::ilogbf;
|
|
|
|
using ::ilogbl;
|
|
|
|
|
|
|
|
using ::lgamma;
|
|
|
|
using ::lgammaf;
|
|
|
|
using ::lgammal;
|
|
|
|
|
|
|
|
using ::llrint;
|
|
|
|
using ::llrintf;
|
|
|
|
using ::llrintl;
|
|
|
|
|
|
|
|
using ::llround;
|
|
|
|
using ::llroundf;
|
|
|
|
using ::llroundl;
|
|
|
|
|
|
|
|
using ::log1p;
|
|
|
|
using ::log1pf;
|
|
|
|
using ::log1pl;
|
|
|
|
|
|
|
|
using ::log2;
|
|
|
|
using ::log2f;
|
|
|
|
using ::log2l;
|
|
|
|
|
|
|
|
using ::logb;
|
|
|
|
using ::logbf;
|
|
|
|
using ::logbl;
|
|
|
|
|
|
|
|
using ::lrint;
|
|
|
|
using ::lrintf;
|
|
|
|
using ::lrintl;
|
|
|
|
|
|
|
|
using ::lround;
|
|
|
|
using ::lroundf;
|
|
|
|
using ::lroundl;
|
|
|
|
|
|
|
|
using ::nan;
|
|
|
|
using ::nanf;
|
|
|
|
using ::nanl;
|
|
|
|
|
|
|
|
using ::nearbyint;
|
|
|
|
using ::nearbyintf;
|
|
|
|
using ::nearbyintl;
|
|
|
|
|
|
|
|
using ::nextafter;
|
|
|
|
using ::nextafterf;
|
|
|
|
using ::nextafterl;
|
|
|
|
|
|
|
|
using ::nexttoward;
|
|
|
|
using ::nexttowardf;
|
|
|
|
using ::nexttowardl;
|
|
|
|
|
|
|
|
using ::remainder;
|
|
|
|
using ::remainderf;
|
|
|
|
using ::remainderl;
|
|
|
|
|
|
|
|
using ::remquo;
|
|
|
|
using ::remquof;
|
|
|
|
using ::remquol;
|
|
|
|
|
|
|
|
using ::rint;
|
|
|
|
using ::rintf;
|
|
|
|
using ::rintl;
|
|
|
|
|
|
|
|
using ::round;
|
|
|
|
using ::roundf;
|
|
|
|
using ::roundl;
|
|
|
|
|
|
|
|
using ::scalbln;
|
|
|
|
using ::scalblnf;
|
|
|
|
using ::scalblnl;
|
|
|
|
|
|
|
|
using ::scalbn;
|
|
|
|
using ::scalbnf;
|
|
|
|
using ::scalbnl;
|
|
|
|
|
|
|
|
using ::tgamma;
|
|
|
|
using ::tgammaf;
|
|
|
|
using ::tgammal;
|
|
|
|
|
|
|
|
using ::trunc;
|
|
|
|
using ::truncf;
|
|
|
|
using ::truncl;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GLIBCXX_USE_C99_MATH
|
|
|
|
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
|
|
|
|
|
|
|
|
/// Function template definitions [8.16.3].
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
fpclassify(_Tp __f)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
|
|
|
|
FP_SUBNORMAL, FP_ZERO, __type(__f));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isfinite(_Tp __f)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isfinite(__type(__f));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isinf(_Tp __f)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isinf(__type(__f));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isnan(_Tp __f)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isnan(__type(__f));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isnormal(_Tp __f)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isnormal(__type(__f));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
signbit(_Tp __f)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_signbit(__type(__f));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isgreater(_Tp __f1, _Tp __f2)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isgreater(__type(__f1), __type(__f2));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isgreaterequal(_Tp __f1, _Tp __f2)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isgreaterequal(__type(__f1), __type(__f2));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isless(_Tp __f1, _Tp __f2)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isless(__type(__f1), __type(__f2));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
islessequal(_Tp __f1, _Tp __f2)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_islessequal(__type(__f1), __type(__f2));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
islessgreater(_Tp __f1, _Tp __f2)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_islessgreater(__type(__f1), __type(__f2));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
|
|
|
|
int>::__type
|
|
|
|
isunordered(_Tp __f1, _Tp __f2)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
|
|
|
return __builtin_isunordered(__type(__f1), __type(__f2));
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GLIBCXX_USE_C99_MATH_TR1
|
|
|
|
|
|
|
|
/// Additional overloads [8.16.4].
|
|
|
|
using std::acos;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
acosh(float __x)
|
|
|
|
{ return __builtin_acoshf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
acosh(long double __x)
|
|
|
|
{ return __builtin_acoshl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
acosh(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_acosh(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::asin;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
asinh(float __x)
|
|
|
|
{ return __builtin_asinhf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
asinh(long double __x)
|
|
|
|
{ return __builtin_asinhl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
asinh(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_asinh(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::atan;
|
|
|
|
using std::atan2;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
atanh(float __x)
|
|
|
|
{ return __builtin_atanhf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
atanh(long double __x)
|
|
|
|
{ return __builtin_atanhl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
atanh(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_atanh(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
cbrt(float __x)
|
|
|
|
{ return __builtin_cbrtf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
cbrt(long double __x)
|
|
|
|
{ return __builtin_cbrtl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
cbrt(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_cbrt(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::ceil;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
copysign(float __x, float __y)
|
|
|
|
{ return __builtin_copysignf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
copysign(long double __x, long double __y)
|
|
|
|
{ return __builtin_copysignl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
copysign(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return copysign(__type(__x), __type(__y));
|
|
|
|
}
|
|
|
|
|
|
|
|
using std::cos;
|
|
|
|
using std::cosh;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
erf(float __x)
|
|
|
|
{ return __builtin_erff(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
erf(long double __x)
|
|
|
|
{ return __builtin_erfl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
erf(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_erf(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
erfc(float __x)
|
|
|
|
{ return __builtin_erfcf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
erfc(long double __x)
|
|
|
|
{ return __builtin_erfcl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
erfc(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_erfc(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::exp;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
exp2(float __x)
|
|
|
|
{ return __builtin_exp2f(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
exp2(long double __x)
|
|
|
|
{ return __builtin_exp2l(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
exp2(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_exp2(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
expm1(float __x)
|
|
|
|
{ return __builtin_expm1f(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
expm1(long double __x)
|
|
|
|
{ return __builtin_expm1l(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
expm1(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_expm1(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
2011-02-12 19:30:50 +01:00
|
|
|
// Note: we deal with fabs in a special way, because an using std::fabs
|
|
|
|
// would bring in also the overloads for complex types, which in C++0x
|
|
|
|
// mode have a different return type.
|
2012-03-14 18:08:03 +01:00
|
|
|
// With __CORRECT_ISO_CPP_MATH_H_PROTO, math.h imports std::fabs in the
|
2011-08-18 18:56:55 +02:00
|
|
|
// global namespace after the declarations of the float / double / long
|
|
|
|
// double overloads but before the std::complex overloads.
|
2011-02-12 19:30:50 +01:00
|
|
|
using ::fabs;
|
|
|
|
|
2012-03-14 18:08:03 +01:00
|
|
|
#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
|
2011-02-12 19:30:50 +01:00
|
|
|
inline float
|
|
|
|
fabs(float __x)
|
|
|
|
{ return __builtin_fabsf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
fabs(long double __x)
|
|
|
|
{ return __builtin_fabsl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
|
|
|
fabs(_Tp __x)
|
|
|
|
{ return __builtin_fabs(__x); }
|
2011-08-18 16:59:47 +02:00
|
|
|
#endif
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
fdim(float __x, float __y)
|
|
|
|
{ return __builtin_fdimf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
fdim(long double __x, long double __y)
|
|
|
|
{ return __builtin_fdiml(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
fdim(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return fdim(__type(__x), __type(__y));
|
|
|
|
}
|
|
|
|
|
|
|
|
using std::floor;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
fma(float __x, float __y, float __z)
|
|
|
|
{ return __builtin_fmaf(__x, __y, __z); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
fma(long double __x, long double __y, long double __z)
|
|
|
|
{ return __builtin_fmal(__x, __y, __z); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up, typename _Vp>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
fma(_Tp __x, _Up __y, _Vp __z)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
|
|
|
|
return fma(__type(__x), __type(__y), __type(__z));
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
fmax(float __x, float __y)
|
|
|
|
{ return __builtin_fmaxf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
fmax(long double __x, long double __y)
|
|
|
|
{ return __builtin_fmaxl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
fmax(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return fmax(__type(__x), __type(__y));
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
fmin(float __x, float __y)
|
|
|
|
{ return __builtin_fminf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
fmin(long double __x, long double __y)
|
|
|
|
{ return __builtin_fminl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
fmin(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return fmin(__type(__x), __type(__y));
|
|
|
|
}
|
|
|
|
|
|
|
|
using std::fmod;
|
|
|
|
using std::frexp;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
hypot(float __x, float __y)
|
|
|
|
{ return __builtin_hypotf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
hypot(long double __x, long double __y)
|
|
|
|
{ return __builtin_hypotl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
hypot(_Tp __y, _Up __x)
|
2010-11-02 19:51:23 +01:00
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
return hypot(__type(__y), __type(__x));
|
2010-11-02 19:51:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
inline int
|
|
|
|
ilogb(float __x)
|
|
|
|
{ return __builtin_ilogbf(__x); }
|
|
|
|
|
|
|
|
inline int
|
|
|
|
ilogb(long double __x)
|
|
|
|
{ return __builtin_ilogbl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
int>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
ilogb(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_ilogb(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::ldexp;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
lgamma(float __x)
|
|
|
|
{ return __builtin_lgammaf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
lgamma(long double __x)
|
|
|
|
{ return __builtin_lgammal(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
lgamma(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_lgamma(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline long long
|
|
|
|
llrint(float __x)
|
|
|
|
{ return __builtin_llrintf(__x); }
|
|
|
|
|
|
|
|
inline long long
|
|
|
|
llrint(long double __x)
|
|
|
|
{ return __builtin_llrintl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
long long>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
llrint(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_llrint(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline long long
|
|
|
|
llround(float __x)
|
|
|
|
{ return __builtin_llroundf(__x); }
|
|
|
|
|
|
|
|
inline long long
|
|
|
|
llround(long double __x)
|
|
|
|
{ return __builtin_llroundl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
long long>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
llround(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_llround(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::log;
|
|
|
|
using std::log10;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
log1p(float __x)
|
|
|
|
{ return __builtin_log1pf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
log1p(long double __x)
|
|
|
|
{ return __builtin_log1pl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
log1p(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_log1p(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
// DR 568.
|
|
|
|
inline float
|
|
|
|
log2(float __x)
|
|
|
|
{ return __builtin_log2f(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
log2(long double __x)
|
|
|
|
{ return __builtin_log2l(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
log2(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_log2(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
logb(float __x)
|
|
|
|
{ return __builtin_logbf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
logb(long double __x)
|
|
|
|
{ return __builtin_logbl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
logb(_Tp __x)
|
|
|
|
{
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
return __builtin_logb(__x);
|
2010-11-02 19:51:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
inline long
|
|
|
|
lrint(float __x)
|
|
|
|
{ return __builtin_lrintf(__x); }
|
|
|
|
|
|
|
|
inline long
|
|
|
|
lrint(long double __x)
|
|
|
|
{ return __builtin_lrintl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
long>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
lrint(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_lrint(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline long
|
|
|
|
lround(float __x)
|
|
|
|
{ return __builtin_lroundf(__x); }
|
|
|
|
|
|
|
|
inline long
|
|
|
|
lround(long double __x)
|
|
|
|
{ return __builtin_lroundl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
long>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
lround(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_lround(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
nearbyint(float __x)
|
|
|
|
{ return __builtin_nearbyintf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
nearbyint(long double __x)
|
|
|
|
{ return __builtin_nearbyintl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
nearbyint(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_nearbyint(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
nextafter(float __x, float __y)
|
|
|
|
{ return __builtin_nextafterf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
nextafter(long double __x, long double __y)
|
|
|
|
{ return __builtin_nextafterl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
nextafter(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return nextafter(__type(__x), __type(__y));
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
nexttoward(float __x, long double __y)
|
|
|
|
{ return __builtin_nexttowardf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
nexttoward(long double __x, long double __y)
|
|
|
|
{ return __builtin_nexttowardl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
nexttoward(_Tp __x, long double __y)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_nexttoward(__x, __y); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
// DR 550. What should the return type of pow(float,int) be?
|
|
|
|
// NB: C++0x and TR1 != C++03.
|
|
|
|
// using std::pow;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
remainder(float __x, float __y)
|
|
|
|
{ return __builtin_remainderf(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
remainder(long double __x, long double __y)
|
|
|
|
{ return __builtin_remainderl(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
remainder(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return remainder(__type(__x), __type(__y));
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
remquo(float __x, float __y, int* __pquo)
|
|
|
|
{ return __builtin_remquof(__x, __y, __pquo); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
remquo(long double __x, long double __y, int* __pquo)
|
|
|
|
{ return __builtin_remquol(__x, __y, __pquo); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
constraining on the return type.
* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
nextafter, remainder, remquo): Likewise.
From-SVN: r181341
2011-11-14 00:51:42 +01:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
remquo(_Tp __x, _Up __y, int* __pquo)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return remquo(__type(__x), __type(__y), __pquo);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
rint(float __x)
|
|
|
|
{ return __builtin_rintf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
rint(long double __x)
|
|
|
|
{ return __builtin_rintl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
rint(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_rint(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
round(float __x)
|
|
|
|
{ return __builtin_roundf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
round(long double __x)
|
|
|
|
{ return __builtin_roundl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
round(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_round(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
scalbln(float __x, long __ex)
|
|
|
|
{ return __builtin_scalblnf(__x, __ex); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
scalbln(long double __x, long __ex)
|
|
|
|
{ return __builtin_scalblnl(__x, __ex); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
scalbln(_Tp __x, long __ex)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_scalbln(__x, __ex); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
scalbn(float __x, int __ex)
|
|
|
|
{ return __builtin_scalbnf(__x, __ex); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
scalbn(long double __x, int __ex)
|
|
|
|
{ return __builtin_scalbnl(__x, __ex); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
scalbn(_Tp __x, int __ex)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_scalbn(__x, __ex); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
using std::sin;
|
|
|
|
using std::sinh;
|
|
|
|
using std::sqrt;
|
|
|
|
using std::tan;
|
|
|
|
using std::tanh;
|
|
|
|
|
|
|
|
inline float
|
|
|
|
tgamma(float __x)
|
|
|
|
{ return __builtin_tgammaf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
tgamma(long double __x)
|
|
|
|
{ return __builtin_tgammal(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
tgamma(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_tgamma(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
|
|
|
inline float
|
|
|
|
trunc(float __x)
|
|
|
|
{ return __builtin_truncf(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
trunc(long double __x)
|
|
|
|
{ return __builtin_truncl(__x); }
|
|
|
|
|
|
|
|
template<typename _Tp>
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
|
|
|
|
double>::__type
|
2010-11-02 19:51:23 +01:00
|
|
|
trunc(_Tp __x)
|
re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48933
* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
scalbn, tgamma, trunc): Use __enable_if on the return type.
* include/tr1/cmath: Likewise.
* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.
From-SVN: r173574
2011-05-09 17:38:21 +02:00
|
|
|
{ return __builtin_trunc(__x); }
|
2010-11-02 19:51:23 +01:00
|
|
|
|
2006-03-07 17:53:44 +01:00
|
|
|
#endif
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
2010-11-02 19:51:23 +01:00
|
|
|
}
|
|
|
|
}
|
2006-03-07 17:53:44 +01:00
|
|
|
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
cmath (pow(float, int), [...]): Do not define in C++0x mode, per DR 550.
2008-05-26 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (pow(float, int), pow(double, int),
pow(long double, int)): Do not define in C++0x mode, per DR 550.
* include/tr1_impl/cmath (pow): Do not bring in unconditionally
from namespace std.
* include/tr1/cmath (pow(double, double), pow(float, float),
pow(long double, long double), pow(_Tp, _Up)): Define.
* include/tr1/complex (pow): Do not bring in from namespace std.
(pow(const std::complex<_Tp>&, int), pow(const std::complex<_Tp>&,
const _Tp&), pow(const _Tp&, const std::complex<_Tp>&),
pow(const std::complex<_Tp>&, const std::complex<_Tp>&)): Define.
* include/tr1_impl/complex (pow(const std::complex<_Tp>&,
const _Up&), pow(const _Tp&, const std::complex<_Up>&),
pow(const std::complex<_Tp>&, const std::complex<_Up>&)): Always
define.
* doc/xml/manual/intro.xml: Add an entry for DR 550.
* testsuite/26_numerics/headers/cmath/dr550.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads.cc: Adjust.
From-SVN: r135955
2008-05-26 21:18:24 +02:00
|
|
|
{
|
|
|
|
namespace tr1
|
|
|
|
{
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
|
cmath (pow(float, int), [...]): Do not define in C++0x mode, per DR 550.
2008-05-26 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (pow(float, int), pow(double, int),
pow(long double, int)): Do not define in C++0x mode, per DR 550.
* include/tr1_impl/cmath (pow): Do not bring in unconditionally
from namespace std.
* include/tr1/cmath (pow(double, double), pow(float, float),
pow(long double, long double), pow(_Tp, _Up)): Define.
* include/tr1/complex (pow): Do not bring in from namespace std.
(pow(const std::complex<_Tp>&, int), pow(const std::complex<_Tp>&,
const _Tp&), pow(const _Tp&, const std::complex<_Tp>&),
pow(const std::complex<_Tp>&, const std::complex<_Tp>&)): Define.
* include/tr1_impl/complex (pow(const std::complex<_Tp>&,
const _Up&), pow(const _Tp&, const std::complex<_Up>&),
pow(const std::complex<_Tp>&, const std::complex<_Up>&)): Always
define.
* doc/xml/manual/intro.xml: Add an entry for DR 550.
* testsuite/26_numerics/headers/cmath/dr550.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads.cc: Adjust.
From-SVN: r135955
2008-05-26 21:18:24 +02:00
|
|
|
// DR 550. What should the return type of pow(float,int) be?
|
|
|
|
// NB: C++0x and TR1 != C++03.
|
|
|
|
inline double
|
|
|
|
pow(double __x, double __y)
|
|
|
|
{ return std::pow(__x, __y); }
|
|
|
|
|
|
|
|
inline float
|
|
|
|
pow(float __x, float __y)
|
|
|
|
{ return std::pow(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
pow(long double __x, long double __y)
|
|
|
|
{ return std::pow(__x, __y); }
|
|
|
|
|
|
|
|
template<typename _Tp, typename _Up>
|
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
|
|
|
|
pow(_Tp __x, _Up __y)
|
|
|
|
{
|
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
|
|
|
|
return std::pow(__type(__x), __type(__y));
|
|
|
|
}
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
|
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
cmath (pow(float, int), [...]): Do not define in C++0x mode, per DR 550.
2008-05-26 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (pow(float, int), pow(double, int),
pow(long double, int)): Do not define in C++0x mode, per DR 550.
* include/tr1_impl/cmath (pow): Do not bring in unconditionally
from namespace std.
* include/tr1/cmath (pow(double, double), pow(float, float),
pow(long double, long double), pow(_Tp, _Up)): Define.
* include/tr1/complex (pow): Do not bring in from namespace std.
(pow(const std::complex<_Tp>&, int), pow(const std::complex<_Tp>&,
const _Tp&), pow(const _Tp&, const std::complex<_Tp>&),
pow(const std::complex<_Tp>&, const std::complex<_Tp>&)): Define.
* include/tr1_impl/complex (pow(const std::complex<_Tp>&,
const _Up&), pow(const _Tp&, const std::complex<_Up>&),
pow(const std::complex<_Tp>&, const std::complex<_Up>&)): Always
define.
* doc/xml/manual/intro.xml: Add an entry for DR 550.
* testsuite/26_numerics/headers/cmath/dr550.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/overloads.cc: Adjust.
From-SVN: r135955
2008-05-26 21:18:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-06-01 01:37:56 +02:00
|
|
|
#include <bits/stl_algobase.h>
|
|
|
|
#include <limits>
|
2007-06-13 09:31:39 +02:00
|
|
|
#include <tr1/type_traits>
|
2008-03-26 07:27:35 +01:00
|
|
|
|
2007-03-16 11:35:16 +01:00
|
|
|
#include <tr1/gamma.tcc>
|
|
|
|
#include <tr1/bessel_function.tcc>
|
|
|
|
#include <tr1/beta_function.tcc>
|
|
|
|
#include <tr1/ell_integral.tcc>
|
|
|
|
#include <tr1/exp_integral.tcc>
|
|
|
|
#include <tr1/hypergeometric.tcc>
|
|
|
|
#include <tr1/legendre_function.tcc>
|
|
|
|
#include <tr1/modified_bessel_func.tcc>
|
|
|
|
#include <tr1/poly_hermite.tcc>
|
|
|
|
#include <tr1/poly_laguerre.tcc>
|
|
|
|
#include <tr1/riemann_zeta.tcc>
|
|
|
|
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
2007-03-16 11:35:16 +01:00
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
namespace tr1
|
|
|
|
{
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/**
|
2009-02-19 09:15:15 +01:00
|
|
|
* @defgroup tr1_math_spec_func Mathematical Special Functions
|
|
|
|
* @ingroup numerics
|
|
|
|
*
|
2008-03-26 07:27:35 +01:00
|
|
|
* A collection of advanced mathematical special functions.
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2007-03-16 11:35:16 +01:00
|
|
|
inline float
|
|
|
|
assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
|
|
|
|
{ return __detail::__assoc_laguerre<float>(__n, __m, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
|
|
|
|
{
|
|
|
|
return __detail::__assoc_laguerre<long double>(__n, __m, __x);
|
|
|
|
}
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.1 Associated Laguerre polynomials.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__assoc_laguerre<__type>(__n, __m, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
assoc_legendref(unsigned int __l, unsigned int __m, float __x)
|
|
|
|
{ return __detail::__assoc_legendre_p<float>(__l, __m, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
|
|
|
|
{ return __detail::__assoc_legendre_p<long double>(__l, __m, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.2 Associated Legendre functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__assoc_legendre_p<__type>(__l, __m, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
betaf(float __x, float __y)
|
|
|
|
{ return __detail::__beta<float>(__x, __y); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
betal(long double __x, long double __y)
|
|
|
|
{ return __detail::__beta<long double>(__x, __y); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.3 Beta functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpx, typename _Tpy>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
beta(_Tpx __x, _Tpy __y)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__beta<__type>(__x, __y);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
comp_ellint_1f(float __k)
|
|
|
|
{ return __detail::__comp_ellint_1<float>(__k); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
comp_ellint_1l(long double __k)
|
|
|
|
{ return __detail::__comp_ellint_1<long double>(__k); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.4 Complete elliptic integrals of the first kind.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
comp_ellint_1(_Tp __k)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__comp_ellint_1<__type>(__k);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
comp_ellint_2f(float __k)
|
|
|
|
{ return __detail::__comp_ellint_2<float>(__k); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
comp_ellint_2l(long double __k)
|
|
|
|
{ return __detail::__comp_ellint_2<long double>(__k); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.5 Complete elliptic integrals of the second kind.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
comp_ellint_2(_Tp __k)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__comp_ellint_2<__type>(__k);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
comp_ellint_3f(float __k, float __nu)
|
|
|
|
{ return __detail::__comp_ellint_3<float>(__k, __nu); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
comp_ellint_3l(long double __k, long double __nu)
|
|
|
|
{ return __detail::__comp_ellint_3<long double>(__k, __nu); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.6 Complete elliptic integrals of the third kind.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp, typename _Tpn>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
comp_ellint_3(_Tp __k, _Tpn __nu)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__comp_ellint_3<__type>(__k, __nu);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
conf_hypergf(float __a, float __c, float __x)
|
|
|
|
{ return __detail::__conf_hyperg<float>(__a, __c, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
conf_hypergl(long double __a, long double __c, long double __x)
|
|
|
|
{ return __detail::__conf_hyperg<long double>(__a, __c, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.7 Confluent hypergeometric functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpa, typename _Tpc, typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
conf_hyperg(_Tpa __a, _Tpc __c, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__conf_hyperg<__type>(__a, __c, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
cyl_bessel_if(float __nu, float __x)
|
|
|
|
{ return __detail::__cyl_bessel_i<float>(__nu, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
cyl_bessel_il(long double __nu, long double __x)
|
|
|
|
{ return __detail::__cyl_bessel_i<long double>(__nu, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.8 Regular modified cylindrical Bessel functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpnu, typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
cyl_bessel_i(_Tpnu __nu, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__cyl_bessel_i<__type>(__nu, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
cyl_bessel_jf(float __nu, float __x)
|
|
|
|
{ return __detail::__cyl_bessel_j<float>(__nu, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
cyl_bessel_jl(long double __nu, long double __x)
|
|
|
|
{ return __detail::__cyl_bessel_j<long double>(__nu, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.9 Cylindrical Bessel functions (of the first kind).
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpnu, typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
cyl_bessel_j(_Tpnu __nu, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__cyl_bessel_j<__type>(__nu, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
cyl_bessel_kf(float __nu, float __x)
|
|
|
|
{ return __detail::__cyl_bessel_k<float>(__nu, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
cyl_bessel_kl(long double __nu, long double __x)
|
|
|
|
{ return __detail::__cyl_bessel_k<long double>(__nu, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.10 Irregular modified cylindrical Bessel functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpnu, typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
cyl_bessel_k(_Tpnu __nu, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__cyl_bessel_k<__type>(__nu, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
cyl_neumannf(float __nu, float __x)
|
|
|
|
{ return __detail::__cyl_neumann_n<float>(__nu, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
cyl_neumannl(long double __nu, long double __x)
|
|
|
|
{ return __detail::__cyl_neumann_n<long double>(__nu, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.11 Cylindrical Neumann functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpnu, typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
cyl_neumann(_Tpnu __nu, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__cyl_neumann_n<__type>(__nu, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
ellint_1f(float __k, float __phi)
|
|
|
|
{ return __detail::__ellint_1<float>(__k, __phi); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
ellint_1l(long double __k, long double __phi)
|
|
|
|
{ return __detail::__ellint_1<long double>(__k, __phi); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.12 Incomplete elliptic integrals of the first kind.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp, typename _Tpp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
ellint_1(_Tp __k, _Tpp __phi)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__ellint_1<__type>(__k, __phi);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
ellint_2f(float __k, float __phi)
|
|
|
|
{ return __detail::__ellint_2<float>(__k, __phi); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
ellint_2l(long double __k, long double __phi)
|
|
|
|
{ return __detail::__ellint_2<long double>(__k, __phi); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.13 Incomplete elliptic integrals of the second kind.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp, typename _Tpp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
ellint_2(_Tp __k, _Tpp __phi)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__ellint_2<__type>(__k, __phi);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
ellint_3f(float __k, float __nu, float __phi)
|
|
|
|
{ return __detail::__ellint_3<float>(__k, __nu, __phi); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
ellint_3l(long double __k, long double __nu, long double __phi)
|
|
|
|
{ return __detail::__ellint_3<long double>(__k, __nu, __phi); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.14 Incomplete elliptic integrals of the third kind.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp, typename _Tpn, typename _Tpp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__ellint_3<__type>(__k, __nu, __phi);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
expintf(float __x)
|
|
|
|
{ return __detail::__expint<float>(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
expintl(long double __x)
|
|
|
|
{ return __detail::__expint<long double>(__x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.15 Exponential integrals.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
expint(_Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__expint<__type>(__x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
hermitef(unsigned int __n, float __x)
|
|
|
|
{ return __detail::__poly_hermite<float>(__n, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
hermitel(unsigned int __n, long double __x)
|
|
|
|
{ return __detail::__poly_hermite<long double>(__n, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.16 Hermite polynomials.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
hermite(unsigned int __n, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__poly_hermite<__type>(__n, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
hypergf(float __a, float __b, float __c, float __x)
|
|
|
|
{ return __detail::__hyperg<float>(__a, __b, __c, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
hypergl(long double __a, long double __b, long double __c, long double __x)
|
|
|
|
{ return __detail::__hyperg<long double>(__a, __b, __c, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.17 Hypergeometric functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tpa, typename _Tpb, typename _Tpc, typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__hyperg<__type>(__a, __b, __c, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
laguerref(unsigned int __n, float __x)
|
|
|
|
{ return __detail::__laguerre<float>(__n, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
laguerrel(unsigned int __n, long double __x)
|
|
|
|
{ return __detail::__laguerre<long double>(__n, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.18 Laguerre polynomials.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
laguerre(unsigned int __n, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__laguerre<__type>(__n, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
legendref(unsigned int __n, float __x)
|
|
|
|
{ return __detail::__poly_legendre_p<float>(__n, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
legendrel(unsigned int __n, long double __x)
|
|
|
|
{ return __detail::__poly_legendre_p<long double>(__n, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.19 Legendre polynomials.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
legendre(unsigned int __n, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__poly_legendre_p<__type>(__n, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
riemann_zetaf(float __x)
|
|
|
|
{ return __detail::__riemann_zeta<float>(__x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
riemann_zetal(long double __x)
|
|
|
|
{ return __detail::__riemann_zeta<long double>(__x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.20 Riemann zeta function.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
riemann_zeta(_Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__riemann_zeta<__type>(__x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
sph_besself(unsigned int __n, float __x)
|
|
|
|
{ return __detail::__sph_bessel<float>(__n, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
sph_bessell(unsigned int __n, long double __x)
|
|
|
|
{ return __detail::__sph_bessel<long double>(__n, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.21 Spherical Bessel functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
sph_bessel(unsigned int __n, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__sph_bessel<__type>(__n, __x);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
sph_legendref(unsigned int __l, unsigned int __m, float __theta)
|
|
|
|
{ return __detail::__sph_legendre<float>(__l, __m, __theta); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
|
|
|
|
{ return __detail::__sph_legendre<long double>(__l, __m, __theta); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.22 Spherical associated Legendre functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__sph_legendre<__type>(__l, __m, __theta);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline float
|
|
|
|
sph_neumannf(unsigned int __n, float __x)
|
|
|
|
{ return __detail::__sph_neumann<float>(__n, __x); }
|
|
|
|
|
|
|
|
inline long double
|
|
|
|
sph_neumannl(unsigned int __n, long double __x)
|
|
|
|
{ return __detail::__sph_neumann<long double>(__n, __x); }
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/// 5.2.1.23 Spherical Neumann functions.
|
2007-03-16 11:35:16 +01:00
|
|
|
template<typename _Tp>
|
2007-06-01 01:37:56 +02:00
|
|
|
inline typename __gnu_cxx::__promote<_Tp>::__type
|
2007-03-16 11:35:16 +01:00
|
|
|
sph_neumann(unsigned int __n, _Tp __x)
|
|
|
|
{
|
2007-06-01 01:37:56 +02:00
|
|
|
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
|
2007-03-16 11:35:16 +01:00
|
|
|
return __detail::__sph_neumann<__type>(__n, __x);
|
|
|
|
}
|
|
|
|
|
2008-03-26 07:27:35 +01:00
|
|
|
/* @} */ // tr1_math_spec_func
|
PR libstdc++/36104 part four
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
From-SVN: r169421
2011-01-30 23:39:36 +01:00
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
2007-06-01 01:37:56 +02:00
|
|
|
}
|
2006-02-26 19:42:29 +01:00
|
|
|
}
|
|
|
|
|
2007-06-01 01:37:56 +02:00
|
|
|
#endif // _GLIBCXX_TR1_CMATH
|