(define_operator_list simple_comparison lt le eq ne ge gt)
(define_operator_list swapped_simple_comparison gt ge eq ne le lt)
-(define_operator_list LOG BUILT_IN_LOGF BUILT_IN_LOG BUILT_IN_LOGL)
-(define_operator_list EXP BUILT_IN_EXPF BUILT_IN_EXP BUILT_IN_EXPL)
-(define_operator_list LOG2 BUILT_IN_LOG2F BUILT_IN_LOG2 BUILT_IN_LOG2L)
-(define_operator_list EXP2 BUILT_IN_EXP2F BUILT_IN_EXP2 BUILT_IN_EXP2L)
-(define_operator_list LOG10 BUILT_IN_LOG10F BUILT_IN_LOG10 BUILT_IN_LOG10L)
-(define_operator_list EXP10 BUILT_IN_EXP10F BUILT_IN_EXP10 BUILT_IN_EXP10L)
-(define_operator_list POW BUILT_IN_POWF BUILT_IN_POW BUILT_IN_POWL)
-(define_operator_list POW10 BUILT_IN_POW10F BUILT_IN_POW10 BUILT_IN_POW10L)
-(define_operator_list SQRT BUILT_IN_SQRTF BUILT_IN_SQRT BUILT_IN_SQRTL)
-(define_operator_list CBRT BUILT_IN_CBRTF BUILT_IN_CBRT BUILT_IN_CBRTL)
-(define_operator_list SIN BUILT_IN_SINF BUILT_IN_SIN BUILT_IN_SINL)
-(define_operator_list COS BUILT_IN_COSF BUILT_IN_COS BUILT_IN_COSL)
-(define_operator_list TAN BUILT_IN_TANF BUILT_IN_TAN BUILT_IN_TANL)
-(define_operator_list ATAN BUILT_IN_ATANF BUILT_IN_ATAN BUILT_IN_ATANL)
-(define_operator_list COSH BUILT_IN_COSHF BUILT_IN_COSH BUILT_IN_COSHL)
-(define_operator_list CEXP BUILT_IN_CEXPF BUILT_IN_CEXP BUILT_IN_CEXPL)
-(define_operator_list CEXPI BUILT_IN_CEXPIF BUILT_IN_CEXPI BUILT_IN_CEXPIL)
-(define_operator_list CPROJ BUILT_IN_CPROJF BUILT_IN_CPROJ BUILT_IN_CPROJL)
-(define_operator_list CCOS BUILT_IN_CCOSF BUILT_IN_CCOS BUILT_IN_CCOSL)
-(define_operator_list CCOSH BUILT_IN_CCOSHF BUILT_IN_CCOSH BUILT_IN_CCOSHL)
-(define_operator_list HYPOT BUILT_IN_HYPOTF BUILT_IN_HYPOT BUILT_IN_HYPOTL)
-(define_operator_list COPYSIGN BUILT_IN_COPYSIGNF
- BUILT_IN_COPYSIGN
- BUILT_IN_COPYSIGNL)
-(define_operator_list CABS BUILT_IN_CABSF BUILT_IN_CABS BUILT_IN_CABSL)
-(define_operator_list TRUNC BUILT_IN_TRUNCF BUILT_IN_TRUNC BUILT_IN_TRUNCL)
-(define_operator_list FLOOR BUILT_IN_FLOORF BUILT_IN_FLOOR BUILT_IN_FLOORL)
-(define_operator_list CEIL BUILT_IN_CEILF BUILT_IN_CEIL BUILT_IN_CEILL)
-(define_operator_list ROUND BUILT_IN_ROUNDF BUILT_IN_ROUND BUILT_IN_ROUNDL)
-(define_operator_list NEARBYINT BUILT_IN_NEARBYINTF
- BUILT_IN_NEARBYINT
- BUILT_IN_NEARBYINTL)
-(define_operator_list RINT BUILT_IN_RINTF BUILT_IN_RINT BUILT_IN_RINTL)
+/* Define an operand list for math function FN, with float, double and
+ long double variants (in that order). */
+#define DEFINE_MATH_FN(FN) \
+ (define_operator_list FN BUILT_IN_##FN##F BUILT_IN_##FN BUILT_IN_##FN##L)
+
+DEFINE_MATH_FN (LOG)
+DEFINE_MATH_FN (EXP)
+DEFINE_MATH_FN (LOG2)
+DEFINE_MATH_FN (EXP2)
+DEFINE_MATH_FN (LOG10)
+DEFINE_MATH_FN (EXP10)
+DEFINE_MATH_FN (POW)
+DEFINE_MATH_FN (POW10)
+DEFINE_MATH_FN (SQRT)
+DEFINE_MATH_FN (CBRT)
+DEFINE_MATH_FN (SIN)
+DEFINE_MATH_FN (COS)
+DEFINE_MATH_FN (TAN)
+DEFINE_MATH_FN (ATAN)
+DEFINE_MATH_FN (COSH)
+DEFINE_MATH_FN (CEXP)
+DEFINE_MATH_FN (CEXPI)
+DEFINE_MATH_FN (CPROJ)
+DEFINE_MATH_FN (CCOS)
+DEFINE_MATH_FN (CCOSH)
+DEFINE_MATH_FN (HYPOT)
+DEFINE_MATH_FN (COPYSIGN)
+DEFINE_MATH_FN (CABS)
+DEFINE_MATH_FN (TRUNC)
+DEFINE_MATH_FN (FLOOR)
+DEFINE_MATH_FN (CEIL)
+DEFINE_MATH_FN (ROUND)
+DEFINE_MATH_FN (NEARBYINT)
+DEFINE_MATH_FN (RINT)
/* Simplifications of operations with one constant operand and
simplifications to constants or single values. */