Blame math/tgmath.h

Packit Service 82fcde
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
/*
Packit Service 82fcde
 *	ISO C99 Standard: 7.22 Type-generic math	<tgmath.h>
Packit Service 82fcde
 */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _TGMATH_H
Packit Service 82fcde
#define _TGMATH_H	1
Packit Service 82fcde
Packit Service 82fcde
#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
Packit Service 82fcde
#include <bits/libc-header-start.h>
Packit Service 82fcde
Packit Service 82fcde
/* Include the needed headers.  */
Packit Service 82fcde
#include <bits/floatn.h>
Packit Service 82fcde
#include <math.h>
Packit Service 82fcde
#include <complex.h>
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* There are two variant implementations of type-generic macros in
Packit Service 82fcde
   this file: one for GCC 8 and later, using __builtin_tgmath and
Packit Service 82fcde
   where each macro expands each of its arguments only once, and one
Packit Service 82fcde
   for older GCC, using other compiler extensions but with macros
Packit Service 82fcde
   expanding their arguments many times (so resulting in exponential
Packit Service 82fcde
   blowup of the size of expansions when calls to such macros are
Packit Service 82fcde
   nested inside arguments to such macros).  */
Packit Service 82fcde
Packit Service 82fcde
#define __HAVE_BUILTIN_TGMATH __GNUC_PREREQ (8, 0)
Packit Service 82fcde
Packit Service 82fcde
#if __GNUC_PREREQ (2, 7)
Packit Service 82fcde
Packit Service 82fcde
# if __HAVE_BUILTIN_TGMATH
Packit Service 82fcde
Packit Service 82fcde
#  if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F16_ARG(X) X ## f16,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F16_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
#  if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F32_ARG(X) X ## f32,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F32_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
#  if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F64_ARG(X) X ## f64,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F64_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
#  if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F128_ARG(X) X ## f128,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F128_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
#  if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F32X_ARG(X) X ## f32x,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F32X_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
#  if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F64X_ARG(X) X ## f64x,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F64X_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
#  if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   define __TG_F128X_ARG(X) X ## f128x,
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TG_F128X_ARG(X)
Packit Service 82fcde
#  endif
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_FUNCS(X) X ## f, X, X ## l,				\
Packit Service 82fcde
    __TG_F16_ARG (X) __TG_F32_ARG (X) __TG_F64_ARG (X) __TG_F128_ARG (X) \
Packit Service 82fcde
    __TG_F32X_ARG (X) __TG_F64X_ARG (X) __TG_F128X_ARG (X)
Packit Service 82fcde
#  define __TGMATH_RCFUNCS(F, C) __TGMATH_FUNCS (F) __TGMATH_FUNCS (C)
Packit Service 82fcde
#  define __TGMATH_1(F, X) __builtin_tgmath (__TGMATH_FUNCS (F) (X))
Packit Service 82fcde
#  define __TGMATH_2(F, X, Y) __builtin_tgmath (__TGMATH_FUNCS (F) (X), (Y))
Packit Service 82fcde
#  define __TGMATH_2STD(F, X, Y) __builtin_tgmath (F ## f, F, F ## l, (X), (Y))
Packit Service 82fcde
#  define __TGMATH_3(F, X, Y, Z) __builtin_tgmath (__TGMATH_FUNCS (F)	\
Packit Service 82fcde
						   (X), (Y), (Z))
Packit Service 82fcde
#  define __TGMATH_1C(F, C, X) __builtin_tgmath (__TGMATH_RCFUNCS (F, C) (X))
Packit Service 82fcde
#  define __TGMATH_2C(F, C, X, Y) __builtin_tgmath (__TGMATH_RCFUNCS (F, C) \
Packit Service 82fcde
						    (X), (Y))
Packit Service 82fcde
Packit Service 82fcde
# else /* !__HAVE_BUILTIN_TGMATH.  */
Packit Service 82fcde
Packit Service 82fcde
#  ifdef __NO_LONG_DOUBLE_MATH
Packit Service 82fcde
#   define __tgml(fct) fct
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __tgml(fct) fct ## l
Packit Service 82fcde
#  endif
Packit Service 82fcde
Packit Service 82fcde
/* __floating_type expands to 1 if TYPE is a floating type (including
Packit Service 82fcde
   complex floating types), 0 if TYPE is an integer type (including
Packit Service 82fcde
   complex integer types).  __real_integer_type expands to 1 if TYPE
Packit Service 82fcde
   is a real integer type.  __complex_integer_type expands to 1 if
Packit Service 82fcde
   TYPE is a complex integer type.  All these macros expand to integer
Packit Service 82fcde
   constant expressions.  All these macros can assume their argument
Packit Service 82fcde
   has an arithmetic type (not vector, decimal floating-point or
Packit Service 82fcde
   fixed-point), valid to pass to tgmath.h macros.  */
Packit Service 82fcde
#  if __GNUC_PREREQ (3, 1)
Packit Service 82fcde
/* __builtin_classify_type expands to an integer constant expression
Packit Service 82fcde
   in GCC 3.1 and later.  Default conversions applied to the argument
Packit Service 82fcde
   of __builtin_classify_type mean it always returns 1 for real
Packit Service 82fcde
   integer types rather than ever returning different values for
Packit Service 82fcde
   character, boolean or enumerated types.  */
Packit Service 82fcde
#   define __floating_type(type)				\
Packit Service 82fcde
  (__builtin_classify_type (__real__ ((type) 0)) == 8)
Packit Service 82fcde
#   define __real_integer_type(type)		\
Packit Service 82fcde
  (__builtin_classify_type ((type) 0) == 1)
Packit Service 82fcde
#   define __complex_integer_type(type)				\
Packit Service 82fcde
  (__builtin_classify_type ((type) 0) == 9			\
Packit Service 82fcde
   && __builtin_classify_type (__real__ ((type) 0)) == 1)
Packit Service 82fcde
#  else
Packit Service 82fcde
/* GCC versions predating __builtin_classify_type are also looser on
Packit Service 82fcde
   what counts as an integer constant expression.  */
Packit Service 82fcde
#   define __floating_type(type) (((type) 1.25) != 1)
Packit Service 82fcde
#   define __real_integer_type(type) (((type) (1.25 + _Complex_I)) == 1)
Packit Service 82fcde
#   define __complex_integer_type(type)			\
Packit Service 82fcde
  (((type) (1.25 + _Complex_I)) == (1 + _Complex_I))
Packit Service 82fcde
#  endif
Packit Service 82fcde
Packit Service 82fcde
/* Whether an expression (of arithmetic type) has a real type.  */
Packit Service 82fcde
#  define __expr_is_real(E) (__builtin_classify_type (E) != 9)
Packit Service 82fcde
Packit Service 82fcde
/* The tgmath real type for T, where E is 0 if T is an integer type
Packit Service 82fcde
   and 1 for a floating type.  If T has a complex type, it is
Packit Service 82fcde
   unspecified whether the return type is real or complex (but it has
Packit Service 82fcde
   the correct corresponding real type).  */
Packit Service 82fcde
#  define __tgmath_real_type_sub(T, E) \
Packit Service 82fcde
  __typeof__ (*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0	      \
Packit Service 82fcde
		  : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
Packit Service 82fcde
Packit Service 82fcde
/* The tgmath real type of EXPR.  */
Packit Service 82fcde
#  define __tgmath_real_type(expr) \
Packit Service 82fcde
  __tgmath_real_type_sub (__typeof__ ((__typeof__ (+(expr))) 0),	      \
Packit Service 82fcde
			  __floating_type (__typeof__ (+(expr))))
Packit Service 82fcde
Packit Service 82fcde
/* The tgmath complex type for T, where E1 is 1 if T has a floating
Packit Service 82fcde
   type and 0 otherwise, E2 is 1 if T has a real integer type and 0
Packit Service 82fcde
   otherwise, and E3 is 1 if T has a complex type and 0 otherwise.  */
Packit Service 82fcde
#  define __tgmath_complex_type_sub(T, E1, E2, E3)			\
Packit Service 82fcde
  __typeof__ (*(0							\
Packit Service 82fcde
		? (__typeof__ (0 ? (T *) 0 : (void *) (!(E1)))) 0	\
Packit Service 82fcde
		: (__typeof__ (0					\
Packit Service 82fcde
			       ? (__typeof__ (0				\
Packit Service 82fcde
					      ? (double *) 0		\
Packit Service 82fcde
					      : (void *) (!(E2)))) 0	\
Packit Service 82fcde
			       : (__typeof__ (0				\
Packit Service 82fcde
					      ? (_Complex double *) 0	\
Packit Service 82fcde
					      : (void *) (!(E3)))) 0)) 0))
Packit Service 82fcde
Packit Service 82fcde
/* The tgmath complex type of EXPR.  */
Packit Service 82fcde
#  define __tgmath_complex_type(expr)					\
Packit Service 82fcde
  __tgmath_complex_type_sub (__typeof__ ((__typeof__ (+(expr))) 0),	\
Packit Service 82fcde
			     __floating_type (__typeof__ (+(expr))),	\
Packit Service 82fcde
			     __real_integer_type (__typeof__ (+(expr))), \
Packit Service 82fcde
			     __complex_integer_type (__typeof__ (+(expr))))
Packit Service 82fcde
Packit Service 82fcde
#  if (__HAVE_DISTINCT_FLOAT16			\
Packit Service 82fcde
      || __HAVE_DISTINCT_FLOAT32		\
Packit Service 82fcde
      || __HAVE_DISTINCT_FLOAT64		\
Packit Service 82fcde
      || __HAVE_DISTINCT_FLOAT32X		\
Packit Service 82fcde
      || __HAVE_DISTINCT_FLOAT64X		\
Packit Service 82fcde
      || __HAVE_DISTINCT_FLOAT128X)
Packit Service 82fcde
#   error "Unsupported _FloatN or _FloatNx types for <tgmath.h>."
Packit Service 82fcde
#  endif
Packit Service 82fcde
Packit Service 82fcde
/* Expand to text that checks if ARG_COMB has type _Float128, and if
Packit Service 82fcde
   so calls the appropriately suffixed FCT (which may include a cast),
Packit Service 82fcde
   or FCT and CFCT for complex functions, with arguments ARG_CALL.  */
Packit Service 82fcde
#  if __HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
Packit Service 82fcde
#   if (!__HAVE_FLOAT64X			\
Packit Service 82fcde
       || __HAVE_FLOAT64X_LONG_DOUBLE		\
Packit Service 82fcde
       || !__HAVE_FLOATN_NOT_TYPEDEF)
Packit Service 82fcde
#    define __TGMATH_F128(arg_comb, fct, arg_call)			\
Packit Service 82fcde
  __builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128)	\
Packit Service 82fcde
  ? fct ## f128 arg_call :
Packit Service 82fcde
#    define __TGMATH_CF128(arg_comb, fct, cfct, arg_call)		\
Packit Service 82fcde
  __builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), _Float128) \
Packit Service 82fcde
  ? (__expr_is_real (arg_comb)						\
Packit Service 82fcde
     ? fct ## f128 arg_call						\
Packit Service 82fcde
     : cfct ## f128 arg_call) :
Packit Service 82fcde
#   else
Packit Service 82fcde
/* _Float64x is a distinct type at the C language level, which must be
Packit Service 82fcde
   handled like _Float128.  */
Packit Service 82fcde
#    define __TGMATH_F128(arg_comb, fct, arg_call)			\
Packit Service 82fcde
  (__builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128)	\
Packit Service 82fcde
   || __builtin_types_compatible_p (__typeof (+(arg_comb)), _Float64x)) \
Packit Service 82fcde
  ? fct ## f128 arg_call :
Packit Service 82fcde
#    define __TGMATH_CF128(arg_comb, fct, cfct, arg_call)		\
Packit Service 82fcde
  (__builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), _Float128) \
Packit Service 82fcde
   || __builtin_types_compatible_p (__typeof (+__real__ (arg_comb)),	\
Packit Service 82fcde
				    _Float64x))				\
Packit Service 82fcde
  ? (__expr_is_real (arg_comb)						\
Packit Service 82fcde
     ? fct ## f128 arg_call						\
Packit Service 82fcde
     : cfct ## f128 arg_call) :
Packit Service 82fcde
#   endif
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define __TGMATH_F128(arg_comb, fct, arg_call) /* Nothing.  */
Packit Service 82fcde
#   define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) /* Nothing.  */
Packit Service 82fcde
#  endif
Packit Service 82fcde
Packit Service 82fcde
# endif /* !__HAVE_BUILTIN_TGMATH.  */
Packit Service 82fcde
Packit Service 82fcde
/* We have two kinds of generic macros: to support functions which are
Packit Service 82fcde
   only defined on real valued parameters and those which are defined
Packit Service 82fcde
   for complex functions as well.  */
Packit Service 82fcde
# if __HAVE_BUILTIN_TGMATH
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_ONLY(Val, Fct) __TGMATH_1 (Fct, (Val))
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_RET_ONLY(Val, Fct) __TGMATH_1 (Fct, (Val))
Packit Service 82fcde
#  define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct)	\
Packit Service 82fcde
  __TGMATH_2 (Fct, (Val1), (Val2))
Packit Service 82fcde
#  define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct)	\
Packit Service 82fcde
  __TGMATH_2STD (Fct, (Val1), (Val2))
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct)	\
Packit Service 82fcde
  __TGMATH_2 (Fct, (Val1), (Val2))
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct)	\
Packit Service 82fcde
  __TGMATH_2STD (Fct, (Val1), (Val2))
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct)	\
Packit Service 82fcde
  __TGMATH_2 (Fct, (Val1), (Val2))
Packit Service 82fcde
#  define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
Packit Service 82fcde
  __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
Packit Service 82fcde
#  define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct)	\
Packit Service 82fcde
  __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
Packit Service 82fcde
#  define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct)	\
Packit Service 82fcde
  __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct)	\
Packit Service 82fcde
  __TGMATH_1C (Fct, Cfct, (Val))
Packit Service 82fcde
#  define __TGMATH_UNARY_IMAG(Val, Cfct) __TGMATH_1 (Cfct, (Val))
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct)	\
Packit Service 82fcde
  __TGMATH_1C (Fct, Cfct, (Val))
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct)	\
Packit Service 82fcde
  __TGMATH_1 (Cfct, (Val))
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct)	\
Packit Service 82fcde
  __TGMATH_2C (Fct, Cfct, (Val1), (Val2))
Packit Service 82fcde
Packit Service 82fcde
# else /* !__HAVE_BUILTIN_TGMATH.  */
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_ONLY(Val, Fct)				\
Packit Service 82fcde
  (__extension__ ((sizeof (+(Val)) == sizeof (double)			      \
Packit Service 82fcde
		      || __builtin_classify_type (Val) != 8)		      \
Packit Service 82fcde
		     ? (__tgmath_real_type (Val)) Fct (Val)		      \
Packit Service 82fcde
		     : (sizeof (+(Val)) == sizeof (float))		      \
Packit Service 82fcde
		     ? (__tgmath_real_type (Val)) Fct##f (Val)		      \
Packit Service 82fcde
		     : __TGMATH_F128 ((Val), (__tgmath_real_type (Val)) Fct,  \
Packit Service 82fcde
				      (Val))				      \
Packit Service 82fcde
		     (__tgmath_real_type (Val)) __tgml(Fct) (Val)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_RET_ONLY(Val, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+(Val)) == sizeof (double)		      \
Packit Service 82fcde
		      || __builtin_classify_type (Val) != 8)		      \
Packit Service 82fcde
		     ? Fct (Val)					      \
Packit Service 82fcde
		     : (sizeof (+(Val)) == sizeof (float))		      \
Packit Service 82fcde
		     ? Fct##f (Val)					      \
Packit Service 82fcde
		     : __TGMATH_F128 ((Val), Fct, (Val))		      \
Packit Service 82fcde
		     __tgml(Fct) (Val)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
		      || __builtin_classify_type (Val1) != 8)		      \
Packit Service 82fcde
		     ? (__tgmath_real_type (Val1)) Fct (Val1, Val2)	      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (float))		      \
Packit Service 82fcde
		     ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2)	      \
Packit Service 82fcde
		     : __TGMATH_F128 ((Val1), (__tgmath_real_type (Val1)) Fct, \
Packit Service 82fcde
				    (Val1, Val2))			      \
Packit Service 82fcde
		     (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
		      || __builtin_classify_type (Val1) != 8)		      \
Packit Service 82fcde
		     ? (__tgmath_real_type (Val1)) Fct (Val1, Val2)	      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (float))		      \
Packit Service 82fcde
		     ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2)	      \
Packit Service 82fcde
		     : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double)	      \
Packit Service 82fcde
		      && __builtin_classify_type ((Val1) + (Val2)) == 8)      \
Packit Service 82fcde
		     ? __TGMATH_F128 ((Val1) + (Val2),			      \
Packit Service 82fcde
				      (__typeof				      \
Packit Service 82fcde
				       ((__tgmath_real_type (Val1)) 0	      \
Packit Service 82fcde
					+ (__tgmath_real_type (Val2)) 0)) Fct, \
Packit Service 82fcde
				      (Val1, Val2))			      \
Packit Service 82fcde
		     (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				+ (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		     __tgml(Fct) (Val1, Val2)				      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
			|| sizeof (+(Val2)) == sizeof (double)		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val1) != 8		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val2) != 8)		      \
Packit Service 82fcde
		     ? (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       Fct (Val1, Val2)					      \
Packit Service 82fcde
		     : (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       Fct##f (Val1, Val2)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double)	      \
Packit Service 82fcde
		      && __builtin_classify_type ((Val1) + (Val2)) == 8)      \
Packit Service 82fcde
		     ? (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				  + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       __tgml(Fct) (Val1, Val2)				      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
			|| sizeof (+(Val2)) == sizeof (double)		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val1) != 8		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val2) != 8)		      \
Packit Service 82fcde
		     ? (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       Fct (Val1, Val2)					      \
Packit Service 82fcde
		     : (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       Fct##f (Val1, Val2)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double)	      \
Packit Service 82fcde
		      && __builtin_classify_type ((Val1) + (Val2)) == 8)      \
Packit Service 82fcde
		     ? __TGMATH_F128 ((Val1) + (Val2), Fct, (Val1, Val2))     \
Packit Service 82fcde
		     __tgml(Fct) (Val1, Val2)				      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
			|| sizeof (+(Val2)) == sizeof (double)		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val1) != 8		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val2) != 8)		      \
Packit Service 82fcde
		     ? Fct (Val1, Val2)					      \
Packit Service 82fcde
		     : Fct##f (Val1, Val2)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double)	      \
Packit Service 82fcde
		      && __builtin_classify_type ((Val1) + (Val2)) == 8)      \
Packit Service 82fcde
		     ? __TGMATH_F128 ((Val1) + (Val2),			      \
Packit Service 82fcde
				      (__typeof				      \
Packit Service 82fcde
				       ((__tgmath_real_type (Val1)) 0	      \
Packit Service 82fcde
					+ (__tgmath_real_type (Val2)) 0)) Fct, \
Packit Service 82fcde
				      (Val1, Val2, Val3))		      \
Packit Service 82fcde
		     (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				+ (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		     __tgml(Fct) (Val1, Val2, Val3)			      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
			|| sizeof (+(Val2)) == sizeof (double)		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val1) != 8		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val2) != 8)		      \
Packit Service 82fcde
		     ? (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       Fct (Val1, Val2, Val3)				      \
Packit Service 82fcde
		     : (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0))	      \
Packit Service 82fcde
		       Fct##f (Val1, Val2, Val3)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof ((Val1) + (Val2) + (Val3)) > sizeof (double)     \
Packit Service 82fcde
		      && __builtin_classify_type ((Val1) + (Val2) + (Val3))   \
Packit Service 82fcde
			 == 8)						      \
Packit Service 82fcde
		     ? __TGMATH_F128 ((Val1) + (Val2) + (Val3),		      \
Packit Service 82fcde
				      (__typeof				      \
Packit Service 82fcde
				       ((__tgmath_real_type (Val1)) 0	      \
Packit Service 82fcde
					+ (__tgmath_real_type (Val2)) 0	      \
Packit Service 82fcde
					+ (__tgmath_real_type (Val3)) 0)) Fct, \
Packit Service 82fcde
				      (Val1, Val2, Val3))		      \
Packit Service 82fcde
		     (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				+ (__tgmath_real_type (Val2)) 0		      \
Packit Service 82fcde
				+ (__tgmath_real_type (Val3)) 0))	      \
Packit Service 82fcde
		       __tgml(Fct) (Val1, Val2, Val3)			      \
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (double)		      \
Packit Service 82fcde
			|| sizeof (+(Val2)) == sizeof (double)		      \
Packit Service 82fcde
			|| sizeof (+(Val3)) == sizeof (double)		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val1) != 8		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val2) != 8		      \
Packit Service 82fcde
			|| __builtin_classify_type (Val3) != 8)		      \
Packit Service 82fcde
		     ? (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0	      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val3)) 0))	      \
Packit Service 82fcde
		       Fct (Val1, Val2, Val3)				      \
Packit Service 82fcde
		     : (__typeof ((__tgmath_real_type (Val1)) 0		      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val2)) 0	      \
Packit Service 82fcde
				   + (__tgmath_real_type (Val3)) 0))	      \
Packit Service 82fcde
		       Fct##f (Val1, Val2, Val3)))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+(Val1)) == sizeof (double)		\
Packit Service 82fcde
		      || __builtin_classify_type (Val1) != 8)		\
Packit Service 82fcde
		     ? Fct (Val1, Val2, Val3)				\
Packit Service 82fcde
		     : (sizeof (+(Val1)) == sizeof (float))		\
Packit Service 82fcde
		     ? Fct##f (Val1, Val2, Val3)			\
Packit Service 82fcde
		     : __TGMATH_F128 ((Val1), Fct, (Val1, Val2, Val3))	\
Packit Service 82fcde
		     __tgml(Fct) (Val1, Val2, Val3)))
Packit Service 82fcde
Packit Service 82fcde
/* XXX This definition has to be changed as soon as the compiler understands
Packit Service 82fcde
   the imaginary keyword.  */
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)	      \
Packit Service 82fcde
		      || __builtin_classify_type (__real__ (Val)) != 8)	      \
Packit Service 82fcde
		     ? (__expr_is_real (Val)				      \
Packit Service 82fcde
			? (__tgmath_complex_type (Val)) Fct (Val)	      \
Packit Service 82fcde
			: (__tgmath_complex_type (Val)) Cfct (Val))	      \
Packit Service 82fcde
		     : (sizeof (+__real__ (Val)) == sizeof (float))	      \
Packit Service 82fcde
		     ? (__expr_is_real (Val)				      \
Packit Service 82fcde
			? (__tgmath_complex_type (Val)) Fct##f (Val)	      \
Packit Service 82fcde
			: (__tgmath_complex_type (Val)) Cfct##f (Val))	      \
Packit Service 82fcde
		     : __TGMATH_CF128 ((Val),				      \
Packit Service 82fcde
				       (__tgmath_complex_type (Val)) Fct,     \
Packit Service 82fcde
				       (__tgmath_complex_type (Val)) Cfct,    \
Packit Service 82fcde
				       (Val))				      \
Packit Service 82fcde
		     (__expr_is_real (Val)				      \
Packit Service 82fcde
		      ? (__tgmath_complex_type (Val)) __tgml(Fct) (Val)	      \
Packit Service 82fcde
		      : (__tgmath_complex_type (Val)) __tgml(Cfct) (Val))))
Packit Service 82fcde
Packit Service 82fcde
#  define __TGMATH_UNARY_IMAG(Val, Cfct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)	      \
Packit Service 82fcde
		      || __builtin_classify_type (__real__ (Val)) != 8)	      \
Packit Service 82fcde
		     ? (__typeof__ ((__tgmath_real_type (Val)) 0	      \
Packit Service 82fcde
				    + _Complex_I)) Cfct (Val)		      \
Packit Service 82fcde
		     : (sizeof (+__real__ (Val)) == sizeof (float))	      \
Packit Service 82fcde
		     ? (__typeof__ ((__tgmath_real_type (Val)) 0	      \
Packit Service 82fcde
				    + _Complex_I)) Cfct##f (Val)	      \
Packit Service 82fcde
		     : __TGMATH_F128 (__real__ (Val),			      \
Packit Service 82fcde
				      (__typeof__			      \
Packit Service 82fcde
				       ((__tgmath_real_type (Val)) 0	      \
Packit Service 82fcde
					+ _Complex_I)) Cfct, (Val))	      \
Packit Service 82fcde
		     (__typeof__ ((__tgmath_real_type (Val)) 0		      \
Packit Service 82fcde
				  + _Complex_I)) __tgml(Cfct) (Val)))
Packit Service 82fcde
Packit Service 82fcde
/* XXX This definition has to be changed as soon as the compiler understands
Packit Service 82fcde
   the imaginary keyword.  */
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) \
Packit Service 82fcde
     (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)	      \
Packit Service 82fcde
		      || __builtin_classify_type (__real__ (Val)) != 8)	      \
Packit Service 82fcde
		     ? (__expr_is_real (Val)				      \
Packit Service 82fcde
			? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
Packit Service 82fcde
			  Fct (Val)					      \
Packit Service 82fcde
			: (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
Packit Service 82fcde
			  Cfct (Val))					      \
Packit Service 82fcde
		     : (sizeof (+__real__ (Val)) == sizeof (float))	      \
Packit Service 82fcde
		     ? (__expr_is_real (Val)				      \
Packit Service 82fcde
			? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
Packit Service 82fcde
			  Fct##f (Val)					      \
Packit Service 82fcde
			: (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
Packit Service 82fcde
			  Cfct##f (Val))				      \
Packit Service 82fcde
		     : __TGMATH_CF128 ((Val), \
Packit Service 82fcde
				       (__typeof__			      \
Packit Service 82fcde
					(__real__			      \
Packit Service 82fcde
					 (__tgmath_real_type (Val)) 0)) Fct,  \
Packit Service 82fcde
				       (__typeof__			      \
Packit Service 82fcde
					(__real__			      \
Packit Service 82fcde
					 (__tgmath_real_type (Val)) 0)) Cfct, \
Packit Service 82fcde
				       (Val))				      \
Packit Service 82fcde
		     (__expr_is_real (Val)				      \
Packit Service 82fcde
		      ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))  \
Packit Service 82fcde
		      __tgml(Fct) (Val)					      \
Packit Service 82fcde
		      : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))  \
Packit Service 82fcde
		      __tgml(Cfct) (Val))))
Packit Service 82fcde
#  define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct)	\
Packit Service 82fcde
  __TGMATH_UNARY_REAL_IMAG_RET_REAL ((Val), Cfct, Cfct)
Packit Service 82fcde
Packit Service 82fcde
/* XXX This definition has to be changed as soon as the compiler understands
Packit Service 82fcde
   the imaginary keyword.  */
Packit Service 82fcde
#  define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
Packit Service 82fcde
     (__extension__ ((sizeof (__real__ (Val1)				      \
Packit Service 82fcde
			      + __real__ (Val2)) > sizeof (double)	      \
Packit Service 82fcde
		      && __builtin_classify_type (__real__ (Val1)	      \
Packit Service 82fcde
						  + __real__ (Val2)) == 8)    \
Packit Service 82fcde
		     ? __TGMATH_CF128 ((Val1) + (Val2),			      \
Packit Service 82fcde
				       (__typeof			      \
Packit Service 82fcde
					((__tgmath_complex_type (Val1)) 0     \
Packit Service 82fcde
					 + (__tgmath_complex_type (Val2)) 0)) \
Packit Service 82fcde
				       Fct,				      \
Packit Service 82fcde
				       (__typeof			      \
Packit Service 82fcde
					((__tgmath_complex_type (Val1)) 0     \
Packit Service 82fcde
					 + (__tgmath_complex_type (Val2)) 0)) \
Packit Service 82fcde
				       Cfct,				      \
Packit Service 82fcde
				       (Val1, Val2))			      \
Packit Service 82fcde
		     (__expr_is_real ((Val1) + (Val2))			      \
Packit Service 82fcde
		      ? (__typeof ((__tgmath_complex_type (Val1)) 0	      \
Packit Service 82fcde
				   + (__tgmath_complex_type (Val2)) 0))	      \
Packit Service 82fcde
		      __tgml(Fct) (Val1, Val2)				      \
Packit Service 82fcde
		      : (__typeof ((__tgmath_complex_type (Val1)) 0	      \
Packit Service 82fcde
				   + (__tgmath_complex_type (Val2)) 0))	      \
Packit Service 82fcde
		      __tgml(Cfct) (Val1, Val2))			      \
Packit Service 82fcde
		     : (sizeof (+__real__ (Val1)) == sizeof (double)	      \
Packit Service 82fcde
			|| sizeof (+__real__ (Val2)) == sizeof (double)	      \
Packit Service 82fcde
			|| __builtin_classify_type (__real__ (Val1)) != 8     \
Packit Service 82fcde
			|| __builtin_classify_type (__real__ (Val2)) != 8)    \
Packit Service 82fcde
		     ? (__expr_is_real ((Val1) + (Val2))		      \
Packit Service 82fcde
			? (__typeof ((__tgmath_complex_type (Val1)) 0	      \
Packit Service 82fcde
				   + (__tgmath_complex_type (Val2)) 0))	      \
Packit Service 82fcde
			  Fct (Val1, Val2)				      \
Packit Service 82fcde
			: (__typeof ((__tgmath_complex_type (Val1)) 0	      \
Packit Service 82fcde
				   + (__tgmath_complex_type (Val2)) 0))	      \
Packit Service 82fcde
			  Cfct (Val1, Val2))				      \
Packit Service 82fcde
		     : (__expr_is_real ((Val1) + (Val2))		      \
Packit Service 82fcde
			? (__typeof ((__tgmath_complex_type (Val1)) 0	      \
Packit Service 82fcde
				   + (__tgmath_complex_type (Val2)) 0))	      \
Packit Service 82fcde
			  Fct##f (Val1, Val2)				      \
Packit Service 82fcde
			: (__typeof ((__tgmath_complex_type (Val1)) 0	      \
Packit Service 82fcde
				   + (__tgmath_complex_type (Val2)) 0))	      \
Packit Service 82fcde
			  Cfct##f (Val1, Val2))))
Packit Service 82fcde
# endif /* !__HAVE_BUILTIN_TGMATH.  */
Packit Service 82fcde
#else
Packit Service 82fcde
# error "Unsupported compiler; you cannot use <tgmath.h>"
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Unary functions defined for real and complex values.  */
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Trigonometric functions.  */
Packit Service 82fcde
Packit Service 82fcde
/* Arc cosine of X.  */
Packit Service 82fcde
#define acos(Val) __TGMATH_UNARY_REAL_IMAG (Val, acos, cacos)
Packit Service 82fcde
/* Arc sine of X.  */
Packit Service 82fcde
#define asin(Val) __TGMATH_UNARY_REAL_IMAG (Val, asin, casin)
Packit Service 82fcde
/* Arc tangent of X.  */
Packit Service 82fcde
#define atan(Val) __TGMATH_UNARY_REAL_IMAG (Val, atan, catan)
Packit Service 82fcde
/* Arc tangent of Y/X.  */
Packit Service 82fcde
#define atan2(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, atan2)
Packit Service 82fcde
Packit Service 82fcde
/* Cosine of X.  */
Packit Service 82fcde
#define cos(Val) __TGMATH_UNARY_REAL_IMAG (Val, cos, ccos)
Packit Service 82fcde
/* Sine of X.  */
Packit Service 82fcde
#define sin(Val) __TGMATH_UNARY_REAL_IMAG (Val, sin, csin)
Packit Service 82fcde
/* Tangent of X.  */
Packit Service 82fcde
#define tan(Val) __TGMATH_UNARY_REAL_IMAG (Val, tan, ctan)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Hyperbolic functions.  */
Packit Service 82fcde
Packit Service 82fcde
/* Hyperbolic arc cosine of X.  */
Packit Service 82fcde
#define acosh(Val) __TGMATH_UNARY_REAL_IMAG (Val, acosh, cacosh)
Packit Service 82fcde
/* Hyperbolic arc sine of X.  */
Packit Service 82fcde
#define asinh(Val) __TGMATH_UNARY_REAL_IMAG (Val, asinh, casinh)
Packit Service 82fcde
/* Hyperbolic arc tangent of X.  */
Packit Service 82fcde
#define atanh(Val) __TGMATH_UNARY_REAL_IMAG (Val, atanh, catanh)
Packit Service 82fcde
Packit Service 82fcde
/* Hyperbolic cosine of X.  */
Packit Service 82fcde
#define cosh(Val) __TGMATH_UNARY_REAL_IMAG (Val, cosh, ccosh)
Packit Service 82fcde
/* Hyperbolic sine of X.  */
Packit Service 82fcde
#define sinh(Val) __TGMATH_UNARY_REAL_IMAG (Val, sinh, csinh)
Packit Service 82fcde
/* Hyperbolic tangent of X.  */
Packit Service 82fcde
#define tanh(Val) __TGMATH_UNARY_REAL_IMAG (Val, tanh, ctanh)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Exponential and logarithmic functions.  */
Packit Service 82fcde
Packit Service 82fcde
/* Exponential function of X.  */
Packit Service 82fcde
#define exp(Val) __TGMATH_UNARY_REAL_IMAG (Val, exp, cexp)
Packit Service 82fcde
Packit Service 82fcde
/* Break VALUE into a normalized fraction and an integral power of 2.  */
Packit Service 82fcde
#define frexp(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, frexp)
Packit Service 82fcde
Packit Service 82fcde
/* X times (two to the EXP power).  */
Packit Service 82fcde
#define ldexp(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, ldexp)
Packit Service 82fcde
Packit Service 82fcde
/* Natural logarithm of X.  */
Packit Service 82fcde
#define log(Val) __TGMATH_UNARY_REAL_IMAG (Val, log, clog)
Packit Service 82fcde
Packit Service 82fcde
/* Base-ten logarithm of X.  */
Packit Service 82fcde
#ifdef __USE_GNU
Packit Service 82fcde
# define log10(Val) __TGMATH_UNARY_REAL_IMAG (Val, log10, clog10)
Packit Service 82fcde
#else
Packit Service 82fcde
# define log10(Val) __TGMATH_UNARY_REAL_ONLY (Val, log10)
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
/* Return exp(X) - 1.  */
Packit Service 82fcde
#define expm1(Val) __TGMATH_UNARY_REAL_ONLY (Val, expm1)
Packit Service 82fcde
Packit Service 82fcde
/* Return log(1 + X).  */
Packit Service 82fcde
#define log1p(Val) __TGMATH_UNARY_REAL_ONLY (Val, log1p)
Packit Service 82fcde
Packit Service 82fcde
/* Return the base 2 signed integral exponent of X.  */
Packit Service 82fcde
#define logb(Val) __TGMATH_UNARY_REAL_ONLY (Val, logb)
Packit Service 82fcde
Packit Service 82fcde
/* Compute base-2 exponential of X.  */
Packit Service 82fcde
#define exp2(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp2)
Packit Service 82fcde
Packit Service 82fcde
/* Compute base-2 logarithm of X.  */
Packit Service 82fcde
#define log2(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Power functions.  */
Packit Service 82fcde
Packit Service 82fcde
/* Return X to the Y power.  */
Packit Service 82fcde
#define pow(Val1, Val2) __TGMATH_BINARY_REAL_IMAG (Val1, Val2, pow, cpow)
Packit Service 82fcde
Packit Service 82fcde
/* Return the square root of X.  */
Packit Service 82fcde
#define sqrt(Val) __TGMATH_UNARY_REAL_IMAG (Val, sqrt, csqrt)
Packit Service 82fcde
Packit Service 82fcde
/* Return `sqrt(X*X + Y*Y)'.  */
Packit Service 82fcde
#define hypot(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, hypot)
Packit Service 82fcde
Packit Service 82fcde
/* Return the cube root of X.  */
Packit Service 82fcde
#define cbrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, cbrt)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Nearest integer, absolute value, and remainder functions.  */
Packit Service 82fcde
Packit Service 82fcde
/* Smallest integral value not less than X.  */
Packit Service 82fcde
#define ceil(Val) __TGMATH_UNARY_REAL_ONLY (Val, ceil)
Packit Service 82fcde
Packit Service 82fcde
/* Absolute value of X.  */
Packit Service 82fcde
#define fabs(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, fabs, cabs)
Packit Service 82fcde
Packit Service 82fcde
/* Largest integer not greater than X.  */
Packit Service 82fcde
#define floor(Val) __TGMATH_UNARY_REAL_ONLY (Val, floor)
Packit Service 82fcde
Packit Service 82fcde
/* Floating-point modulo remainder of X/Y.  */
Packit Service 82fcde
#define fmod(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmod)
Packit Service 82fcde
Packit Service 82fcde
/* Round X to integral valuein floating-point format using current
Packit Service 82fcde
   rounding direction, but do not raise inexact exception.  */
Packit Service 82fcde
#define nearbyint(Val) __TGMATH_UNARY_REAL_ONLY (Val, nearbyint)
Packit Service 82fcde
Packit Service 82fcde
/* Round X to nearest integral value, rounding halfway cases away from
Packit Service 82fcde
   zero.  */
Packit Service 82fcde
#define round(Val) __TGMATH_UNARY_REAL_ONLY (Val, round)
Packit Service 82fcde
Packit Service 82fcde
/* Round X to the integral value in floating-point format nearest but
Packit Service 82fcde
   not larger in magnitude.  */
Packit Service 82fcde
#define trunc(Val) __TGMATH_UNARY_REAL_ONLY (Val, trunc)
Packit Service 82fcde
Packit Service 82fcde
/* Compute remainder of X and Y and put in *QUO a value with sign of x/y
Packit Service 82fcde
   and magnitude congruent `mod 2^n' to the magnitude of the integral
Packit Service 82fcde
   quotient x/y, with n >= 3.  */
Packit Service 82fcde
#define remquo(Val1, Val2, Val3) \
Packit Service 82fcde
     __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY (Val1, Val2, Val3, remquo)
Packit Service 82fcde
Packit Service 82fcde
/* Round X to nearest integral value according to current rounding
Packit Service 82fcde
   direction.  */
Packit Service 82fcde
#define lrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, lrint)
Packit Service 82fcde
#define llrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llrint)
Packit Service 82fcde
Packit Service 82fcde
/* Round X to nearest integral value, rounding halfway cases away from
Packit Service 82fcde
   zero.  */
Packit Service 82fcde
#define lround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, lround)
Packit Service 82fcde
#define llround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llround)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Return X with its signed changed to Y's.  */
Packit Service 82fcde
#define copysign(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, copysign)
Packit Service 82fcde
Packit Service 82fcde
/* Error and gamma functions.  */
Packit Service 82fcde
#define erf(Val) __TGMATH_UNARY_REAL_ONLY (Val, erf)
Packit Service 82fcde
#define erfc(Val) __TGMATH_UNARY_REAL_ONLY (Val, erfc)
Packit Service 82fcde
#define tgamma(Val) __TGMATH_UNARY_REAL_ONLY (Val, tgamma)
Packit Service 82fcde
#define lgamma(Val) __TGMATH_UNARY_REAL_ONLY (Val, lgamma)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Return the integer nearest X in the direction of the
Packit Service 82fcde
   prevailing rounding mode.  */
Packit Service 82fcde
#define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val, rint)
Packit Service 82fcde
Packit Service 82fcde
#if __GLIBC_USE (IEC_60559_BFP_EXT)
Packit Service 82fcde
/* Return X - epsilon.  */
Packit Service 82fcde
# define nextdown(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextdown)
Packit Service 82fcde
/* Return X + epsilon.  */
Packit Service 82fcde
# define nextup(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextup)
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
/* Return X + epsilon if X < Y, X - epsilon if X > Y.  */
Packit Service 82fcde
#define nextafter(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, nextafter)
Packit Service 82fcde
#define nexttoward(Val1, Val2) \
Packit Service 82fcde
     __TGMATH_BINARY_FIRST_REAL_STD_ONLY (Val1, Val2, nexttoward)
Packit Service 82fcde
Packit Service 82fcde
/* Return the remainder of integer divison X / Y with infinite precision.  */
Packit Service 82fcde
#define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder)
Packit Service 82fcde
Packit Service 82fcde
/* Return X times (2 to the Nth power).  */
Packit Service 82fcde
#ifdef __USE_MISC
Packit Service 82fcde
# define scalb(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, scalb)
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
/* Return X times (2 to the Nth power).  */
Packit Service 82fcde
#define scalbn(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbn)
Packit Service 82fcde
Packit Service 82fcde
/* Return X times (2 to the Nth power).  */
Packit Service 82fcde
#define scalbln(Val1, Val2) \
Packit Service 82fcde
     __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbln)
Packit Service 82fcde
Packit Service 82fcde
/* Return the binary exponent of X, which must be nonzero.  */
Packit Service 82fcde
#define ilogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, ilogb)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Return positive difference between X and Y.  */
Packit Service 82fcde
#define fdim(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fdim)
Packit Service 82fcde
Packit Service 82fcde
/* Return maximum numeric value from X and Y.  */
Packit Service 82fcde
#define fmax(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmax)
Packit Service 82fcde
Packit Service 82fcde
/* Return minimum numeric value from X and Y.  */
Packit Service 82fcde
#define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Multiply-add function computed as a ternary operation.  */
Packit Service 82fcde
#define fma(Val1, Val2, Val3) \
Packit Service 82fcde
     __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma)
Packit Service 82fcde
Packit Service 82fcde
#if __GLIBC_USE (IEC_60559_BFP_EXT)
Packit Service 82fcde
/* Round X to nearest integer value, rounding halfway cases to even.  */
Packit Service 82fcde
# define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven)
Packit Service 82fcde
Packit Service 82fcde
# define fromfp(Val1, Val2, Val3)					\
Packit Service 82fcde
  __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, fromfp)
Packit Service 82fcde
Packit Service 82fcde
# define ufromfp(Val1, Val2, Val3)					\
Packit Service 82fcde
  __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, ufromfp)
Packit Service 82fcde
Packit Service 82fcde
# define fromfpx(Val1, Val2, Val3)					\
Packit Service 82fcde
  __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, fromfpx)
Packit Service 82fcde
Packit Service 82fcde
# define ufromfpx(Val1, Val2, Val3)					\
Packit Service 82fcde
  __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, ufromfpx)
Packit Service 82fcde
Packit Service 82fcde
/* Like ilogb, but returning long int.  */
Packit Service 82fcde
# define llogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llogb)
Packit Service 82fcde
Packit Service 82fcde
/* Return value with maximum magnitude.  */
Packit Service 82fcde
# define fmaxmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaxmag)
Packit Service 82fcde
Packit Service 82fcde
/* Return value with minimum magnitude.  */
Packit Service 82fcde
# define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag)
Packit Service 82fcde
Packit Service 82fcde
/* Total order operation.  */
Packit Service 82fcde
# define totalorder(Val1, Val2)					\
Packit Service 82fcde
  __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalorder)
Packit Service 82fcde
Packit Service 82fcde
/* Total order operation on absolute values.  */
Packit Service 82fcde
# define totalordermag(Val1, Val2)				\
Packit Service 82fcde
  __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalordermag)
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Absolute value, conjugates, and projection.  */
Packit Service 82fcde
Packit Service 82fcde
/* Argument value of Z.  */
Packit Service 82fcde
#define carg(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, carg)
Packit Service 82fcde
Packit Service 82fcde
/* Complex conjugate of Z.  */
Packit Service 82fcde
#define conj(Val) __TGMATH_UNARY_IMAG (Val, conj)
Packit Service 82fcde
Packit Service 82fcde
/* Projection of Z onto the Riemann sphere.  */
Packit Service 82fcde
#define cproj(Val) __TGMATH_UNARY_IMAG (Val, cproj)
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
/* Decomposing complex values.  */
Packit Service 82fcde
Packit Service 82fcde
/* Imaginary part of Z.  */
Packit Service 82fcde
#define cimag(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, cimag)
Packit Service 82fcde
Packit Service 82fcde
/* Real part of Z.  */
Packit Service 82fcde
#define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, creal)
Packit Service 82fcde
Packit Service 82fcde
#endif /* tgmath.h */