code: def condition_number_one_input(result, argument, derivative):
      """Returns the condition number at one scalar argument.
  
      Namely, the error in the output induced by rounding the input to a 32-bit
      float, divided by the error in the output induced by rounding the output
      itself to a 32-bit float.
  
      Over most of the float-point range, this is just
  
        |x||f'(x)|
       ------------
          |f(x)|
  
      but some care needs to be taken when x or f(x) may round to 0.
  
      Computations internal to this function are done in float64 to assure
      their own accuracy.
  
      Caveat: If `f` uses `stop_gradient` or similar internally, condition
      numbers estimated by this function may be incorrect.
  
      Args:
        result: A Tensor of `f(x)` values, to be analyzed as though it had
          been subject to float32 round-off.
        argument: A Tensor of `x` values broadcast-compatible with
          `result`, to be analyzed as though it had been subject to
          float32 round-off.
        derivative: A Tensor of `f'(x)` values broadcast-compatible with
          `result`.  If `None`, assume `f(x)` does not depend on `x`
          (which corresponds to a condition number of 0).
  
      Returns:
        condition_number: A float64 Tensor of condition numbers,
          corresponding elementwise to the input Tensors.
  
      """
      if derivative is None:
          # The output doesn't depend on this input (up to stop_gradient
          # tricks), so this input forces no wrong bits.  This is also correct
          # if the input is an integer, because then it's notionally exact
          # and still forces no wrong bits.
          return 0.0
      # Do not correct for increased rounding error in the answer when the answer is
      # close to 0, because that amounts to demanding more precision near zero
      # outputs, and I don't think that demand is appropriate.
      derivative = tf.cast(derivative, dtype=tf.float64)
      return (
          rounding_error(argument)
          * tf.math.abs(derivative)
          / rounding_error(result, denormal_correction=False)
      )
  
file_path: probability/tensorflow_probability/python/internal/numerics_testing.py
imports: import functools
  from absl import logging
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 7 for calling a global function with example usage: condition_number_one_input(result, argument, derivative) and returns: unknown, int