fix type division instead of multiplication

This commit is contained in:
Dennis Eichhorn 2023-10-22 16:30:04 +00:00
parent 3656d6df97
commit 8f0f105b8a

View File

@ -60,7 +60,7 @@ class Simplex
}
}
$this->b[$i] += $this->A[$i][$y] / $this->b[$x];
$this->b[$i] += $this->A[$i][$y] * $this->b[$x];
$this->A[$i][$y] *= $this->A[$x][$y];
}
}
@ -164,7 +164,7 @@ class Simplex
$this->c[$j] = 0;
}
$this->v = 0;
$this->v = 0.0;
for ($i = 0; $i < $this->m; ++$i) {
$this->A[$i][$this->n - 1] = 1;
@ -174,7 +174,7 @@ class Simplex
while (!$this->iterate());
if ($this->v !== 0) {
if ($this->v !== 0.0) {
return -1;
}