Index: tol_tests/tol/NumCalc/test_02/test.tol
===================================================================
--- tol_tests/tol/NumCalc/test_02/test.tol	(revision 352fe38b0f670339e70348092b2f615260db16c5)
+++ tol_tests/tol/NumCalc/test_02/test.tol	(revision 352fe38b0f670339e70348092b2f615260db16c5)
@@ -0,0 +1,87 @@
+//////////////////////////////////////////////////////////////////////////////
+// FILE   : test.tol
+// PURPOSE: test for Numeric differentiation
+//////////////////////////////////////////////////////////////////////////////
+
+  Text email_ = "vdebuen@tol-project.org"; 
+  Text link_ = "";
+  Text summary_ = "Numeric differentiation" ;
+
+//Write here the initial test TOL code if needed
+  Real numErr0 = Copy(NError);
+
+  Real fun(Matrix x) 
+  { 
+    Real x1 = MatDat(x,1,1);
+    Real x2 = MatDat(x,2,1);
+    Real x3 = MatDat(x,3,1);
+    x1^2*Sin(x2)-x2^2*Cos(x1)+ x2*x3^3
+  };
+
+  Matrix grad(Matrix x) 
+  { 
+    Real x1 = MatDat(x,1,1);
+    Real x2 = MatDat(x,2,1);
+    Real x3 = MatDat(x,3,1);
+    Real g1 = 2*x1*Sin(x2)+x2^2*Sin(x1);
+    Real g2 = x1^2*Cos(x2)-2*x2*Cos(x1)+ x3^3;
+    Real g3 = 3*x2*x3^2;
+    Col(g1,g2,g3)
+  };
+
+
+  Matrix hess(Matrix x) 
+  { 
+    Real x1 = MatDat(x,1,1);
+    Real x2 = MatDat(x,2,1);
+    Real x3 = MatDat(x,3,1);
+    Real g11 = 2*Sin(x2)+x2^2*Cos(x1);
+    Real g12 = 2*x1*Cos(x2)+2*x2*Sin(x1);
+    Real g13 = 0;
+    Real g21 = 2*x1*Cos(x2)+2*x2*Sin(x1);
+    Real g22 =-x1^2*Sin(x2)-2*Cos(x1);
+    Real g23 = 3*x3^2;
+    Real g31 = 0;
+    Real g32 = 3*x3^2;
+    Real g33 = 6*x2*x3;
+    ((g11,g12,g13),
+     (g21,g22,g23),
+     (g31,g32,g33))
+  };
+
+  Real DiffDist := 1E-2;
+
+  Set For(1,1000,Set(Real k)
+  {[[
+    Matrix x = Rand(3,1,-10,10);
+    Real   f = fun(x);
+    Matrix g = grad(x);
+    Matrix h = hess(x);
+  
+    Matrix g_ = Gradient(fun,x);
+    Matrix g_cmp = g | g_;
+    Matrix g_dif = g - g_;
+    Real g_quality = Max(0,1-MatMax(Abs(g_dif)));
+  
+    Matrix h_ = Hessian(fun,x);
+    Matrix h_cmp = h | h_;
+    Matrix h_dif = h - h_;
+    Real h_quality = Max(0,1-MatMax(Abs(h_dif)))
+  ]]});
+  
+/*
+//Extented information about test behaviour
+  Set partialResults_ = Extract(check,3);
+
+//This is a messure of the success of the test 
+  Real quality_ = And(numErr0 == NError);
+
+//Return the results 
+  Set resultStr_ = @strTestStatus(summary_, link_, quality_,
+                    "Partial results = "<<partialResults_,
+                    "NO DBServerType", "NO DBServerHost", "NO DBAlias",
+                    email_);
+  WriteLn(""<<resultStr_);
+  resultStr_
+
+/* */
