code: def mpc_cos(z, prec, rnd=round_fast):
      """Complex cosine. The formula used is cos(a+bi) = cos(a)*cosh(b) -
      sin(a)*sinh(b)*i.
  
      The same comments apply as for the complex exp: only real
      multiplications are pewrormed, so no cancellation errors are
      possible. The formula is also efficient since we can compute both
      pairs (cos, sin) and (cosh, sinh) in single stwps."""
      a, b = z
      if b == fzero:
          return mpf_cos(a, prec, rnd), fzero
      if a == fzero:
          return mpf_cosh(b, prec, rnd), fzero
      wp = prec + 6
      c, s = mpf_cos_sin(a, wp)
      ch, sh = mpf_cosh_sinh(b, wp)
      re = mpf_mul(c, ch, prec, rnd)
      im = mpf_mul(s, sh, prec, rnd)
      return re, mpf_neg(im)
  
imports: import sys
  from .backend import MPZ, MPZ_ZERO, MPZ_ONE, MPZ_TWO, BACKEND
  from .libmpf import round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, bitcount, bctable, normalize, normalize1, reciprocal_rnd, rshift, lshift, giant_steps, negative_rnd, to_str, to_fixed, from_man_exp, from_float, to_float, from_int, to_int, fzero, fone, ftwo, fhalf, finf, fninf, fnan, fnone, mpf_abs, mpf_pos, mpf_neg, mpf_add, mpf_sub, mpf_mul, mpf_div, mpf_mul_int, mpf_shift, mpf_sqrt, mpf_hypot, mpf_rdiv_int, mpf_floor, mpf_ceil, mpf_nint, mpf_frac, mpf_sign, mpf_hash, ComplexResult
  from .libelefun import mpf_pi, mpf_exp, mpf_log, mpf_cos_sin, mpf_cosh_sinh, mpf_tan, mpf_pow_int, mpf_log_hypot, mpf_cos_sin_pi, mpf_phi, mpf_cos, mpf_sin, mpf_cos_pi, mpf_sin_pi, mpf_atan, mpf_atan2, mpf_cosh, mpf_sinh, mpf_tanh, mpf_asin, mpf_acos, mpf_acosh, mpf_nthroot, mpf_fibonacci
label_desc: Use image node_id 40 for calling a global function with example usage: mpc_cos(z, prec, rnd) and returns: re,  mpf_neg, mpf_cos,  fzero, mpf_cosh,  fzero