Esempio n. 1
0
 public void DigammaInvTest()
 {
     for (int i = 0; i < 1000; i++)
     {
         double y     = -3 + i * 0.01;
         double x     = MMath.DigammaInv(y);
         double y2    = MMath.Digamma(x);
         double error = MMath.AbsDiff(y, y2, 1e-8);
         Assert.True(error < 1e-8);
     }
 }