+2009-10-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR fortran/33197
+ * gfortran.h (HAVE_mpc_arc): Define.
+ * simplify.c (gfc_simplify_acos): Handle complex acos.
+ (gfc_simplify_acosh): Likewise for acosh.
+ (gfc_simplify_asin): Likewise for asin.
+ (gfc_simplify_asinh): Likewise for asinh.
+ (gfc_simplify_atan): Likewise for atan.
+ (gfc_simplify_atanh): Likewise for atanh.
+
2009-10-01 Tobias Burnus <burnus@net-b.de>
PR fortran/41515
&x->where);
return &gfc_bad_expr;
}
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpfr_acos (result->value.real, x->value.real, GFC_RND_MODE);
break;
case BT_COMPLEX:
+#ifdef HAVE_mpc_arc
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpc_acos (result->value.complex, x->value.complex, GFC_MPC_RND_MODE);
+ break;
+#else
return NULL;
+#endif
default:
gfc_internal_error ("in gfc_simplify_acos(): Bad type");
}
- result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
-
- mpfr_acos (result->value.real, x->value.real, GFC_RND_MODE);
return range_check (result, "ACOS");
}
mpfr_acosh (result->value.real, x->value.real, GFC_RND_MODE);
break;
case BT_COMPLEX:
+#ifdef HAVE_mpc_arc
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpc_acosh (result->value.complex, x->value.complex, GFC_MPC_RND_MODE);
+ break;
+#else
return NULL;
+#endif
default:
gfc_internal_error ("in gfc_simplify_acosh(): Bad type");
}
mpfr_asin (result->value.real, x->value.real, GFC_RND_MODE);
break;
case BT_COMPLEX:
+#ifdef HAVE_mpc_arc
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpc_asin (result->value.complex, x->value.complex, GFC_MPC_RND_MODE);
+ break;
+#else
return NULL;
+#endif
default:
gfc_internal_error ("in gfc_simplify_asin(): Bad type");
}
mpfr_asinh (result->value.real, x->value.real, GFC_RND_MODE);
break;
case BT_COMPLEX:
+#ifdef HAVE_mpc_arc
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpc_asinh (result->value.complex, x->value.complex, GFC_MPC_RND_MODE);
+ break;
+#else
return NULL;
+#endif
default:
gfc_internal_error ("in gfc_simplify_asinh(): Bad type");
}
mpfr_atan (result->value.real, x->value.real, GFC_RND_MODE);
break;
case BT_COMPLEX:
+#ifdef HAVE_mpc_arc
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpc_atan (result->value.complex, x->value.complex, GFC_MPC_RND_MODE);
+ break;
+#else
return NULL;
+#endif
default:
gfc_internal_error ("in gfc_simplify_atan(): Bad type");
}
mpfr_atanh (result->value.real, x->value.real, GFC_RND_MODE);
break;
case BT_COMPLEX:
+#ifdef HAVE_mpc_arc
+ result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
+ mpc_atanh (result->value.complex, x->value.complex, GFC_MPC_RND_MODE);
+ break;
+#else
return NULL;
+#endif
default:
gfc_internal_error ("in gfc_simplify_atanh(): Bad type");
}