Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7724)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7725)
@@ -18,4 +18,14 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2006/05/22 Thomas Bretz
+
+   * mranforest/MRanTree.cc:
+     - replaced some arbitrary small and large values by FLT_MAX in
+       FindBestSpllit*
+     - replaced in FindBestSpllit* a sanity check for rld and rrd (do
+       not divide by zero) by a check whether the result (crit) is finite
+
+
 
  2006/05/21 Thomas Bretz
Index: trunk/MagicSoft/Mars/mranforest/MRanTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanTree.cc	(revision 7724)
+++ trunk/MagicSoft/Mars/mranforest/MRanTree.cc	(revision 7725)
@@ -207,5 +207,5 @@
         MArrayF wr(tclasspop);  // right node//nclass
 
-        Double_t critvar=-1.0e20;
+        Double_t critvar=-FLT_MAX;
         for(Int_t nsp=ndstart;nsp<=ndend-1;nsp++)
         {
@@ -248,8 +248,10 @@
 
             // If crit starts to become pretty large do WHAT???
-            if (TMath::Min(rrd,rld)<=1.0e-5) // FIXME: CHECKIT FOR WEIGHTS!
+            //if (TMath::Min(rrd,rld)<=1.0e-5) // FIXME: CHECKIT FOR WEIGHTS!
+            //    continue;
+
+            const Double_t crit=(rln/rld)+(rrn/rrd);
+            if (TMath::Finite(crit))
                 continue;
-
-            const Double_t crit=(rln/rld)+(rrn/rrd);
 
             // Search for the highest value of crit
@@ -320,5 +322,5 @@
     // start main loop through variables to find best split,
 
-    Double_t critmin=1.0e40;
+    Double_t critmin=FLT_MAX;
 
     // random split selection, number of trials = fNumTry
@@ -399,8 +401,10 @@
                 continue;
 
-            if (TMath::Min(rrd,rld)<=1.0e-5)
+            //if (TMath::Min(rrd,rld)<=1.0e-5)
+            //    continue;
+
+            const Double_t crit=(rln/rld)+(rrn/rrd);
+            if (TMath::Finite(crit))
                 continue;
-
-            const Double_t crit=(rln/rld)+(rrn/rrd);
 
             if (crit>=critvar) continue;
