Ejemplo n.º 1
0
static bool
fold_const_call_cs (real_value *result_real, real_value *result_imag,
		    built_in_function fn, const real_value *arg,
		    const real_format *format)
{
  switch (fn)
    {
    CASE_FLT_FN (BUILT_IN_CEXPI):
      /* cexpi(x+yi) = cos(x)+sin(y)*i.  */
      return do_mpfr_sincos (result_imag, result_real, arg, format);

    default:
      return false;
    }
}
Ejemplo n.º 2
0
static bool
fold_const_call_cs (real_value *result_real, real_value *result_imag,
		    combined_fn fn, const real_value *arg,
		    const real_format *format)
{
  switch (fn)
    {
    CASE_CFN_CEXPI:
      /* cexpi(x+yi) = cos(x)+sin(y)*i.  */
      return do_mpfr_sincos (result_imag, result_real, arg, format);

    default:
      return false;
    }
}