parameters: (old_val, new_val)
return_statement: return float(new_val - old_val) / abs(old_val)
docstring: Return a float representing the decimal change between old_val and new_val.
docstring_summary: Return a float representing the decimal change between old_val and new_val.
docstring_tokens: Return a float representing the decimal change between old_val and new_val .
function: def calculate_change(old_val, new_val):
      """
      Return a float representing the decimal change between old_val and new_val.
      """
      if old_val == 0 and new_val == 0:
          return 0.0
      if old_val == 0:
          return float(new_val - old_val) / (float(old_val + new_val) / 2)
      return float(new_val - old_val) / abs(old_val)
function_tokens: def calculate_change ( old_val , new_val ) : if old_val == 0 and new_val == 0 : return 0.0 if old_val == 0 : return float ( new_val - old_val ) / ( float ( old_val + new_val ) / 2 ) return float ( new_val - old_val ) / abs ( old_val )