Selaa lähdekoodia

examples/reductions/dot_product: fix result checking.

Cyril Roelandt 13 vuotta sitten
vanhempi
commit
5752d326a0
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      examples/reductions/dot_product.c

+ 1 - 1
examples/reductions/dot_product.c

@@ -421,7 +421,7 @@ int main(int argc, char **argv)
 	free(x_handles);
 	free(y_handles);
 
-	if (fabs(reference_dot - dot) < 1e-4)
+	if (fabs(reference_dot - dot) < reference_dot * 1e-6)
 		return EXIT_SUCCESS;
 	else
 		return EXIT_FAILURE;