From 1a8dc9872250309ca02c79acd75e13ec1aef287f Mon Sep 17 00:00:00 2001 From: Andrew DalPino Date: Tue, 19 Sep 2023 00:19:09 -0500 Subject: [PATCH] Fix bug in polyfill --- config.json | 2 +- ext/config.m4 | 2 +- src/Vector.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 4d6ce22..9af2a2c 100644 --- a/config.json +++ b/config.json @@ -6,7 +6,7 @@ "author": "The Rubix ML Community", "version": "3.0.3", "verbose": true, - "extra-cflags": "-O3 -ffast-math", + "extra-cflags": "-O3", "extra-libs": "-lopenblas -llapacke -lgfortran", "extra-sources": [ "include/arithmetic.c", diff --git a/ext/config.m4 b/ext/config.m4 index 4f8a6e2..40d2d4b 100644 --- a/ext/config.m4 +++ b/ext/config.m4 @@ -35,7 +35,7 @@ if test "$PHP_TENSOR" = "yes"; then include/linear_algebra.c include/signal_processing.c include/settings.c" - PHP_NEW_EXTENSION(tensor, $tensor_sources, $ext_shared,, -O3 -ffast-math) + PHP_NEW_EXTENSION(tensor, $tensor_sources, $ext_shared,, -O3) PHP_ADD_BUILD_DIR([$ext_builddir/kernel/]) for dir in "tensor tensor/decompositions tensor/exceptions tensor/reductions"; do PHP_ADD_BUILD_DIR([$ext_builddir/$dir]) diff --git a/src/Vector.php b/src/Vector.php index cc54b75..773d520 100644 --- a/src/Vector.php +++ b/src/Vector.php @@ -1768,7 +1768,7 @@ public function lessEqualMatrix(Matrix $b) : Matrix $rowC = []; foreach ($this->a as $j => $valueA) { - $rowC[] = $valueA < $rowB[$j] ? 1 : 0; + $rowC[] = $valueA <= $rowB[$j] ? 1 : 0; } $c[] = $rowC;