old_contents: import math
  
  def sigmoid(x):
      return 1/(1 + math.exp(-x))
  
  def sigmoidprime(x):
      return (1 - sigmoid(x))*sigmoid(x)
  
new_contents: import math
  import sys
  
  def sigmoid(x):
      try:
          val = 1/(1 + math.exp(-x))
      except OverflowError:
          val = sys.float_info.max
      return val
  
  def sigmoidprime(x):
      return (1 - sigmoid(x))*sigmoid(x)
  
subject: Fix overflow bug