STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
cmath File Reference
#include <bits/c++config.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
#include <math.h>
#include <cmath>
#include <bits/stl_algobase.h>
#include <limits>
#include <tr1/type_traits>
#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>

Macros

#define _GLIBCXX_CMATH   1
 
#define _GLIBCXX_TR1_CMATH   1
 

Functions

namespace std _GLIBCXX_VISIBILITY (default)
 

Detailed Description

This is a TR1 C++ Library header.

Macro Definition Documentation

#define _GLIBCXX_CMATH   1
#define _GLIBCXX_TR1_CMATH   1

Function Documentation

namespace std _GLIBCXX_VISIBILITY ( default  )
147 {
148 namespace tr1
149 {
150 _GLIBCXX_BEGIN_NAMESPACE_VERSION
151 
152 #if _GLIBCXX_USE_C99_MATH_TR1
153 
154  // types
155  using ::double_t;
156  using ::float_t;
157 
158  // functions
159  using ::acosh;
160  using ::acoshf;
161  using ::acoshl;
162 
163  using ::asinh;
164  using ::asinhf;
165  using ::asinhl;
166 
167  using ::atanh;
168  using ::atanhf;
169  using ::atanhl;
170 
171  using ::cbrt;
172  using ::cbrtf;
173  using ::cbrtl;
174 
175  using ::copysign;
176  using ::copysignf;
177  using ::copysignl;
178 
179  using ::erf;
180  using ::erff;
181  using ::erfl;
182 
183  using ::erfc;
184  using ::erfcf;
185  using ::erfcl;
186 
187  using ::exp2;
188  using ::exp2f;
189  using ::exp2l;
190 
191  using ::expm1;
192  using ::expm1f;
193  using ::expm1l;
194 
195  using ::fdim;
196  using ::fdimf;
197  using ::fdiml;
198 
199  using ::fma;
200  using ::fmaf;
201  using ::fmal;
202 
203  using ::fmax;
204  using ::fmaxf;
205  using ::fmaxl;
206 
207  using ::fmin;
208  using ::fminf;
209  using ::fminl;
210 
211  using ::hypot;
212  using ::hypotf;
213  using ::hypotl;
214 
215  using ::ilogb;
216  using ::ilogbf;
217  using ::ilogbl;
218 
219  using ::lgamma;
220  using ::lgammaf;
221  using ::lgammal;
222 
223  using ::llrint;
224  using ::llrintf;
225  using ::llrintl;
226 
227  using ::llround;
228  using ::llroundf;
229  using ::llroundl;
230 
231  using ::log1p;
232  using ::log1pf;
233  using ::log1pl;
234 
235  using ::log2;
236  using ::log2f;
237  using ::log2l;
238 
239  using ::logb;
240  using ::logbf;
241  using ::logbl;
242 
243  using ::lrint;
244  using ::lrintf;
245  using ::lrintl;
246 
247  using ::lround;
248  using ::lroundf;
249  using ::lroundl;
250 
251  using ::nan;
252  using ::nanf;
253  using ::nanl;
254 
255  using ::nearbyint;
256  using ::nearbyintf;
257  using ::nearbyintl;
258 
259  using ::nextafter;
260  using ::nextafterf;
261  using ::nextafterl;
262 
263  using ::nexttoward;
264  using ::nexttowardf;
265  using ::nexttowardl;
266 
267  using ::remainder;
268  using ::remainderf;
269  using ::remainderl;
270 
271  using ::remquo;
272  using ::remquof;
273  using ::remquol;
274 
275  using ::rint;
276  using ::rintf;
277  using ::rintl;
278 
279  using ::round;
280  using ::roundf;
281  using ::roundl;
282 
283  using ::scalbln;
284  using ::scalblnf;
285  using ::scalblnl;
286 
287  using ::scalbn;
288  using ::scalbnf;
289  using ::scalbnl;
290 
291  using ::tgamma;
292  using ::tgammaf;
293  using ::tgammal;
294 
295  using ::trunc;
296  using ::truncf;
297  using ::truncl;
298 
299 #endif
300 
301 #if _GLIBCXX_USE_C99_MATH
302 #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
303 
305  template<typename _Tp>
306  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
307  int>::__type
308  fpclassify(_Tp __f)
309  {
310  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
311  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
312  FP_SUBNORMAL, FP_ZERO, __type(__f));
313  }
314 
315  template<typename _Tp>
316  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
317  int>::__type
318  isfinite(_Tp __f)
319  {
320  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
321  return __builtin_isfinite(__type(__f));
322  }
323 
324  template<typename _Tp>
325  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
326  int>::__type
327  isinf(_Tp __f)
328  {
329  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
330  return __builtin_isinf(__type(__f));
331  }
332 
333  template<typename _Tp>
334  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
335  int>::__type
336  isnan(_Tp __f)
337  {
338  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
339  return __builtin_isnan(__type(__f));
340  }
341 
342  template<typename _Tp>
343  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
344  int>::__type
345  isnormal(_Tp __f)
346  {
347  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
348  return __builtin_isnormal(__type(__f));
349  }
350 
351  template<typename _Tp>
352  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
353  int>::__type
354  signbit(_Tp __f)
355  {
356  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
357  return __builtin_signbit(__type(__f));
358  }
359 
360  template<typename _Tp>
361  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
362  int>::__type
363  isgreater(_Tp __f1, _Tp __f2)
364  {
365  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
366  return __builtin_isgreater(__type(__f1), __type(__f2));
367  }
368 
369  template<typename _Tp>
370  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
371  int>::__type
372  isgreaterequal(_Tp __f1, _Tp __f2)
373  {
374  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
375  return __builtin_isgreaterequal(__type(__f1), __type(__f2));
376  }
377 
378  template<typename _Tp>
379  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
380  int>::__type
381  isless(_Tp __f1, _Tp __f2)
382  {
383  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
384  return __builtin_isless(__type(__f1), __type(__f2));
385  }
386 
387  template<typename _Tp>
388  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
389  int>::__type
390  islessequal(_Tp __f1, _Tp __f2)
391  {
392  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
393  return __builtin_islessequal(__type(__f1), __type(__f2));
394  }
395 
396  template<typename _Tp>
397  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
398  int>::__type
399  islessgreater(_Tp __f1, _Tp __f2)
400  {
401  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
402  return __builtin_islessgreater(__type(__f1), __type(__f2));
403  }
404 
405  template<typename _Tp>
406  inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
407  int>::__type
408  isunordered(_Tp __f1, _Tp __f2)
409  {
410  typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
411  return __builtin_isunordered(__type(__f1), __type(__f2));
412  }
413 
414 #endif
415 #endif
416 
417 #if _GLIBCXX_USE_C99_MATH_TR1
418 
420  using std::acos;
421 
422  inline float
423  acosh(float __x)
424  { return __builtin_acoshf(__x); }
425 
426  inline long double
427  acosh(long double __x)
428  { return __builtin_acoshl(__x); }
429 
430  template<typename _Tp>
431  inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
432  double>::__type
433  acosh(_Tp __x)
434  { return __builtin_acosh(__x); }
435 
436  using std::asin;
437 
438  inline float
439  asinh(float __x)
440  { return __builtin_asinhf(__x); }
441 
442  inline long double
443  asinh(long double __x)
444  { return __builtin_asinhl(__x); }
445 
446  template<typename _Tp>
447  inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
448  double>::__type
449  asinh(_Tp __x)
450  { return __builtin_asinh(__x); }
451 
452  using std::atan;
453  using std::atan2;
454 
455  inline float
456  atanh(float __x)
457  { return __builtin_atanhf(__x); }
458 
459  inline long double
460  atanh(long double __x)
461  { return __builtin_atanhl(__x); }
462 
463  template<typename _Tp>
464  inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
465  double>::__type
466  atanh(_Tp __x)
467  { return __builtin_atanh(__x); }
468 
469  inline float
470  cbrt(float __x)
471  { return __builtin_cbrtf(__x); }
472 
473  inline long double
474  cbrt(long double __x)
475  { return __builtin_cbrtl(__x); }
476 
477  template<typename _Tp>
478  inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
479  double>::__type
480  cbrt(_Tp __x)
481  { return __builtin_cbrt(__x); }
482 
483  using std::ceil;
484 
485  inline float
486  copysign(float __x, float __y)
487  { return __builtin_copysignf(__x, __y); }
488 
489  inline long double
490  copysign(long double __x, long double __y)
491  { return __builtin_copysignl(__x, __y); }
492 
493  template<typename _Tp, typename _Up>
494  inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
495  copysign(_Tp __x, _Up __y)
496  {
497  typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
498  return copysign(__type(__x), __type(__y));
499  }
500 
501  using std::cos;
502  using std::cosh;
503 
504  inline float
505  erf(float __x)
506  { return __builtin_erff(__x); }
507 
508  inline long double
509  erf(long double __x)
510  { return __builtin_erfl(__x); }
511 
512  template<typename _Tp>
513  inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
514  double>::__type
515  erf(_Tp __x)
516  { return __builtin_erf(__x); }
517 
518  inline float
519  erfc(float __x)
520  { return __builtin_erfcf(__x); }
521 
522  inline long double
523  erfc(long double __x)
524  { return __builtin_erfcl(__x); }
525 
526  template<typename _Tp>
527  inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
528  double>::__type
529  erfc(_Tp __x)
530  { return __builtin_erfc(__x); }
531 
532  using std::exp;
533 
534  inline float
535  exp2(float __x)
536  { return __builtin_exp2f(__x); }