code: def normal_CDF_inverse(p):
      assert p > 0.0 and p < 1
  
      # See article above for explanation of this section.
      if p < 0.5:
          # F^-1(p) = - G^-1(p)
          return -rational_approximation(math.sqrt(-2.0 * math.log(p)))
      else:
          # F^-1(p) = G^-1(1-p)
          return rational_approximation(
              math.sqrt(-2.0 * math.log(1.0 - p))
          )
  
file_path: pydlm/pydlm/base/tools.py
imports: import math
label_desc: Use image node_id 3 for calling a global function with example usage: normal_CDF_inverse(p) and returns: unknown, rational_approximation