docs: def pdf_lognormal_basis_integral(d, d_characteristic, s, n):
      r'''Calculates the integral of the multiplication of d^n by the lognormal
      pdf, given a particle diameter `d`, characteristic particle
      diameter `d_characteristic`, distribution standard deviation `s`, and
      exponent `n`.
      
      .. math::
          \int d^n\cdot q(d)\; dd = -\frac{1}{2} \exp\left(\frac{s^2 n^2}{2}
          \right)d^n \left(\frac{d}{d_{characteristic}}\right)^{-n}
          \text{erf}\left[\frac{s^2 n - \log(d/d_{characteristic})}
          {\sqrt{2} s} \right]
          
      This is the crucial integral required for interconversion between different
      bases such as number density (denoted :math:`q_0(d)`), length density 
      (:math:`q_1(d)`), surface area density (:math:`q_2(d)`), or volume density 
      (:math:`q_3(d)`).
          
      Parameters
      ----------
      d : float
          Specified particle diameter, [m]
      d_characteristic : float
          Characteristic particle diameter; often D[3, 3] is used for this
          purpose but not always, [m]
      s : float
          Distribution standard deviation, [-]    
      n : int
          Exponent of the multiplied n
  
      Returns
      -------
      pdf_basis_integral : float
          Integral of lognormal pdf multiplied by d^n, [-]
  
      Notes
      -----
      This integral has been verified numerically. This integral is itself
      integrated, so it is crucial to obtain an analytical form for at least
      this integral.
      
      Note overflow or zero division issues may occur for very large values of 
      `s`, larger than 10. No mathematical limit was able to be obtained with 
      a CAS.
  
      Examples
      --------
      >>> pdf_lognormal_basis_integral(d=1E-4, d_characteristic=1E-5, s=1.1, n=-2)
      56228306549.26362
      '''
      try:
          s2 = s*s
          t0 = exp(s2*n*n*0.5)
          d_ratio = d/d_characteristic
          t1 = (d/(d_ratio))**n
          t2 = erf((s2*n - log(d_ratio))/(2.**0.5*s))
          return -0.5*t0*t1*t2
      except (OverflowError, ZeroDivisionError, ValueError):
          return pdf_lognormal_basis_integral(d=1E-80, d_characteristic=d_characteristic, s=s, n=n)