Index: trunk/psLib/test/math/tap_psHistogram.c
===================================================================
--- trunk/psLib/test/math/tap_psHistogram.c	(revision 17515)
+++ trunk/psLib/test/math/tap_psHistogram.c	(revision 17529)
@@ -134,14 +134,24 @@
         skip_start(myHist == NULL, 1, "Skipping tests because psVectorHistogram() returned NULL");
 
+	// we need to explicitly count the number in each bin.  we can fool ourselves with rounding
+	// otherwise
+
         bool errorFlag = false;
-        for (int i = 0;i < numBins;i++) {
-            if (fabs(myHist->nums->data.F32[i] - (NUM_DATA/numBins)) > ERROR_TOLERANCE) {
-                diag("Bin number %d bounds: (%.2f - %.2f) data (%.2f) should be (%.2f)\n",
-                     i,
-                     myHist->bounds->data.F32[i],
-                     myHist->bounds->data.F32[i + 1],
-                     myHist->nums->data.F32[i], (float) (NUM_DATA/numBins));
-                errorFlag = true;
-            }
+        for (int i = 0; i < numBins; i++) {
+	  int nValues = 0;
+	  for (int j = 0; j < myData->n; j++) {
+	    // XXX EAM : need to get rules right.  which boundary is inclusive, which is exclusive?
+	    if (myData->data.F32[j] <= myHist->bounds->data.F32[i]) continue;
+	    if (myData->data.F32[j] > myHist->bounds->data.F32[i+1]) continue;
+	    nValues ++;
+	  }
+	  if (myHist->nums->data.F32[i] != nValues) {
+	    diag("Bin number %d bounds: (%.2f - %.2f) data (%.2f) should be (%2d)\n",
+		 i,
+		 myHist->bounds->data.F32[i],
+		 myHist->bounds->data.F32[i+1],
+		 myHist->nums->data.F32[i], nValues);
+	    errorFlag = true;
+	  }
         }
         ok(!errorFlag, "psVectorHistogram() correctly set the histogram");
