docs: def pdf_Rosin_Rammler_basis_integral(d, k, m, n):
      r'''Calculates the integral of the multiplication of d^n by the Rosin
      Rammler (RR) pdf, given a particle diameter `d`, and the two parameters `k`
      and `m`.
      
      .. math::
          \int d^n\cdot q(d)\; dd =-d^{m+n} k(d^mk)^{-\frac{m+n}{m}}\Gamma
          \left(\frac{m+n}{m}\right)\text{gammaincc}\left[\left(\frac{m+n}{m}
          \right), kd^m\right]
      
      Parameters
      ----------
      d : float
          Specified particle diameter, [m]
      k : float
          Parameter in the model, [(1/m)^m]
      m : float
          Parameter in the model, [-]
      n : int
          Exponent of the multiplied n, [-]
  
      Returns
      -------
      pdf_basis_integral : float
          Integral of Rosin Rammler pdf multiplied by d^n, [-]
  
      Notes
      -----
      This integral was derived using a CAS, and verified numerically.
      The `gammaincc` function is that from scipy.special, and `gamma` from the
      same.
      
      For very high powers of `n` or `m` when the diameter is very low, 
      exceptions may occur.
  
      Examples
      --------
      >>> "{:g}".format(pdf_Rosin_Rammler_basis_integral(5E-2, 200, 2, 3))
      '-0.000452399'
      '''
      # Also not able to compute the limit for d approaching 0.
      try:
          a = (m + n)/m
          x = d**m*k
          t1 = float(gamma(a))*float(gammaincc(a, x))
          return (-d**(m+n)*k*(d**m*k)**(-a))*t1
      except (OverflowError, ZeroDivisionError) as e:
          if d == 1E-40:
              raise e
          return pdf_Rosin_Rammler_basis_integral(1E-40, k, m, n)