code: def exp_basecase(x, prec):
      """
      Compute exp(x) as a fixed-point number. Works for any x,
      but for speed should have |x| < 1. For an arbitrary number,
      use exp(x) = exp(x-m*log(2)) * 2^m where m = floor(x/log(2)).
      """
      if prec > EXP_COSH_CUTOFF:
          return exponential_series(x, prec, 0)
      r = int(prec**0.5)
      prec += r
      s0 = s1 = MPZ_ONE << prec
      k = 2
      a = x2 = (x * x) >> prec
      while a:
          a //= k
          s0 += a
          k += 1
          a //= k
          s1 += a
          k += 1
          a = (a * x2) >> prec
      s1 = (s1 * x) >> prec
      s = s0 + s1
      u = r
      while r:
          s = (s * s) >> prec
          r -= 1
      return s >> u
  
imports: import math
  from bisect import bisect
  from .backend import xrange
  from .backend import MPZ, MPZ_ZERO, MPZ_ONE, MPZ_TWO, MPZ_FIVE, BACKEND
  from .libmpf import round_floor, round_ceiling, round_down, round_up, round_nearest, round_fast, ComplexResult, bitcount, bctable, lshift, rshift, giant_steps, sqrt_fixed, from_int, to_int, from_man_exp, to_fixed, to_float, from_float, from_rational, normalize, fzero, fone, fnone, fhalf, finf, fninf, fnan, mpf_cmp, mpf_sign, mpf_abs, mpf_pos, mpf_neg, mpf_add, mpf_sub, mpf_mul, mpf_div, mpf_shift, mpf_rdiv_int, mpf_pow_int, mpf_sqrt, reciprocal_rnd, negative_rnd, mpf_perturb, isqrt_fast
  from .libintmath import ifib
label_desc: Use image node_id 41 for calling a global function with example usage: exp_basecase(x, prec) and returns: unknown, exponential_series