code: def epsalg_demo():
      
      def linfun(i):
          return np.linspace(0, np.pi / 2., 2**i + 1)
      dea = EpsAlg(limexp=15)
      print('NO. PANELS      TRAP. APPROX          APPROX W/EA           abserr')
      txt = '{0:5d} {1:20.8f}  {2:20.8f}  {3:20.8f}'
      for k in np.arange(10):
          x = linfun(k)
          val = np.trapz(np.sin(x), x)
          vale = dea(val)
          err = np.abs(1.0 - vale)
          print(txt.format(len(x) - 1, val, vale, err))
docs: >>> epsalg_demo()
      NO. PANELS      TRAP. APPROX          APPROX W/EA           abserr
          1           0.78539816            0.78539816            0.21460184
          2           0.94805945            0.94805945            0.05194055
          4           0.98711580            0.99945672            0.00054328
          8           0.99678517            0.99996674            0.00003326
         16           0.99919668            0.99999988            0.00000012
         32           0.99979919            1.00000000            0.00000000
         64           0.99994980            1.00000000            0.00000000
        128           0.99998745            1.00000000            0.00000000
        256           0.99999686            1.00000000            0.00000000
        512           0.99999922            1.00000000            0.00000000