<?php
$a = 1110;
$b = 370;
$c = 6171.6;
$h = 71.1;
$i = -50; // undef
$k = 0; // undef
$l = 0; // undef
$step = 0.001; // Auflösung für $i
$i_max = 100; // um keine Endlosschleife zu produzieren
$epsilon = 0.001; // Fehlertoleranz
$found = false;
do {
$k = 0.9942;
$l = 0.998670248976177;
$tmp = (556 / ($h / (545.223880597015 / 1000 * $k * $l)));
$found = (abs($i - $tmp) <= $epsilon);
if (!$found) {
$i += $step;
}
if ($i > $i_max) {
throw new Exception('Unable to calculate $i');
}
} while (!$found);
$g = ceil($h / (545.223880597015 / 1000 * $l * $k));
//$i = 556 / $g; // ??? $i haben wir schon
$j = $g * $b / 1000 * $a / 100 * 1;
$e = ($i - $b / 1000) * $a / 100;
$f = $i * $a / 100;
$d = $c - $j;
foreach (range('a', 'l') as $var) {
echo $var . ' = ';
var_dump($$var);
echo '<br />';
}
?>
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- a = int(1110)
<br />b = int(370)
<br />c = float(6171.6)
<br />d = float(5629.476000000001)
<br />e = float(42.87929999971057)
<br />f = float(46.98629999971056)
<br />g = float(132)
<br />h = float(71.1)
<br />i = float(4.2329999999739245)
<br />j = float(542.124)
<br />k = float(0.9942)
<br />l = float(0.998670248976177)
<br />
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
- a = int(1110)
<br />b = int(370)
<br />c = float(6171.6)
<br />d = float(5629.476)
<br />e = float(42.879299999711)
<br />f = float(46.986299999711)
<br />g = float(132)
<br />h = float(71.1)
<br />i = float(4.2329999999739)
<br />j = float(542.124)
<br />k = float(0.9942)
<br />l = float(0.99867024897618)
<br />
- Output for 4.4.2 - 4.4.9
- Parse error: syntax error, unexpected T_NEW in /in/ghBPP on line 29
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
- Parse error: parse error, unexpected T_NEW in /in/ghBPP on line 29
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/ghBPP on line 29
Process exited with code 255.
preferences:
211.96 ms | 401 KiB | 309 Q