- toDNF() corrected

This commit is contained in:
Wiesner András 2025-10-16 13:20:59 +02:00
parent 04aaf11c6b
commit 778b75e7a8

View File

@ -243,7 +243,7 @@ class LogicFunction implements JsonSerializable
if ($r == "1") {
$term = "(";
for ($j = 0; $j < $N; $j++) {
$inv = (($i >> ($N - $j - 1)) & 1) ? "~" : "";
$inv = (($i >> ($N - $j - 1)) & 1) ? "" : "~";
$term .= $inv . $this->input_vars[$j];
if ($j < ($N - 1)) {
$term .= " & ";