input: def linear_eq(a: float, b: float, c: float) -> float:
      """Calculate the objective function of a linear equation ax + by = c.
      >>> linear_eq(3, 5, 7)
      0.0
      >>> linear_eq(2, -3, 1)
      0.0
      """
output:     if a == 0 and b == 0:
          return 0.0 if c == 0 else float('nan')
      elif a == 0:
          return 0.0 if c % b == 0 else float('nan')
      elif b == 0:
          return 0.0 if c % a == 0 else float('nan')
      else:
          return 0.0 if c % (a**2 + b**2) == 0 else float('nan')