code: def _hyp2f1_large_negative_c(a, b, c, z):
      """Compute 2F1(a, b, c, z) when c < 0 and |c| large."""
  
      # The recurrences here are based on Gauss' continguous recurrence relations as
      # based on [1]
      # References
      # [1] M. Abramowitz, I. Stegun. Handbook of Mathematical Functions with
      #     Formulas, Graphs and Mathematical Tables.
      with tf.name_scope("hyp2f1_large_negative_c"):
          dtype = dtype_util.common_dtype([a, b, c, z], tf.float32)
          a = tf.convert_to_tensor(a, dtype=dtype)
          b = tf.convert_to_tensor(b, dtype=dtype)
          c = tf.convert_to_tensor(c, dtype=dtype)
          z = tf.convert_to_tensor(z, dtype=dtype)
  
          # We assume that c < 0 and a, b > 0.
  
          d = c - a - b
          integer_d = tf.math.floor(d)
          e = c + 2 - integer_d
  
          # If |a| >> |e|, use the recurrence for large a.
          recurrence_for_large_a = (tf.math.abs(a) > tf.math.abs(e)) & (
              tf.math.abs(e - a) > 2
          )
          second_result = tf.where(
              recurrence_for_large_a,
              _hyp2f1_large_a(a, b, e, z),
              _hyp2f1_small_parameters(a, b, e, z),
          )
  
          first_result = tf.where(
              recurrence_for_large_a,
              _hyp2f1_large_a(a, b, e + 1.0, z),
              _hyp2f1_small_parameters(a, b, e + 1.0, z),
          )
  
          broadcast_shape = functools.reduce(
              ps.broadcast_shape, [ps.shape(x) for x in [a, b, c]]
          )
  
          # We use recurrence 15.2.27 in [1]:
          # w * 2F1(a, b, c, z) + x * 2F1(a, b, c + 1, z) = y 2F1(a, b, c - 1, z)
          # Where, w, x and y are coefficients for the recurrence (as specified
          # in [1]).
          def hypergeometric_recurrence(
              should_stop, index, term, result, previous_result
          ):
              c = term
              new_result = (
                  c * (c - 1 - (2 * c - a - b - 1.0) * z) * result
                  + (c - a) * (c - b) * z * previous_result
              ) / (c * (c - 1) * (1.0 - z))
              should_stop = index >= 2 - integer_d
              new_term = tf.where(should_stop, term, term - 1.0)
              new_result = tf.where(should_stop, result, new_result)
  
              return (
                  should_stop,
                  index + 1,
                  new_term,
                  new_result,
                  result,
              )
  
          (_, _, _, result, _) = tf.while_loop(
              cond=lambda stop, *_: tf.reduce_any(~stop),
              body=hypergeometric_recurrence,
              loop_vars=(
                  tf.zeros(broadcast_shape, dtype=tf.bool),
                  tf.cast(0.0, dtype=dtype),
                  e,
                  second_result,
                  first_result,
              ),
          )
          return result
  
file_path: probability/tensorflow_probability/python/math/hypergeometric.py
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 4 for calling a global function with example usage: _hyp2f1_large_negative_c(a, b, c, z) and returns: result, should_stop,  unknown,  new_term,  new_result,  result