$x) { if ((isset($r2010[$n])) && ($r2010[$n] == $x)) $a2010=$n; if ((isset($r2012[$n])) && ($r2012[$n] == $x)) $a2012=$n; if ((isset($r2013[$n])) && ($r2013[$n] == $x)) $a2013=$n; } echo "2017 matches to 2010 until " . (($a2010 == count($r2017)) ? "yet" : "step $a2010")."\n"; echo "2017 matches to 2012 until " . (($a2012 == count($r2017)) ? "yet" : "step $a2012")."\n"; echo "2017 matches to 2013 until " . (($a2013 == count($r2017)) ? "yet" : "step $a2013")."\n"; echo "\n"; # --- echo "2010-run slowdown factor : " . immort_slowdown_factor($fn2010) . " sec / step\n"; echo " " . (immort_slowdown_factor($fn2010)/100000) . " sec / digit\n\n"; echo "2012-run slowdown factor : " . immort_slowdown_factor($fn2012) . " sec / step\n"; echo " " . (immort_slowdown_factor($fn2012)/100000) . " sec / digit\n\n"; echo "2013-run slowdown factor : " . immort_slowdown_factor($fn2013) . " sec / step\n"; echo " " . (immort_slowdown_factor($fn2013)/100000) . " sec / digit\n\n"; echo "2017-run slowdown factor : " . immort_slowdown_factor($fn2017) . " sec / step\n"; echo " " . (immort_slowdown_factor($fn2017)/100000) . " sec / digit\n\n"; /* $n = 1017; // hier gibt es unterschiede zwischen 2010- und 2012- run. es ist ungewiss, wer falsch gerechnet hat! echo "immort_estimate_finishtime(2017, $n)\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; $n = 1900; // hier gab es im 2012-run einen overflow, der aber behoben wurde echo "immort_estimate_finishtime(2017, $n)\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; $n = 2000; // bis hierher sind wir im 2010-run gekommen (abgebrochen 2012) echo "immort_estimate_finishtime(2017, $n)\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; $n = 4770; // bis hierher sind wir im 2012-run gekommen (abgebrochen 2013) echo "immort_estimate_finishtime(2017, $n)\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; $n = 5000; // nächste gerade Zahl echo "immort_estimate_finishtime(2017, $n)\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; for ($i=1; $i<=10; $i++) { $n = 10000*$i; echo "immort_estimate_finishtime(2017, $n)\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; } echo "\n"; $n = count($r2010); // nächste gerade Zahl echo "immort_estimate_finishtime(2017, $n [2010 run])\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; $n = count($r2012); // nächste gerade Zahl echo "immort_estimate_finishtime(2017, $n [2012 run])\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; $n = count($r2013); // nächste gerade Zahl echo "immort_estimate_finishtime(2017, $n [2013 run])\t= ".date('Y-m-d H:i:s', immort_estimate_finishtime($fn2017, $n))."\n"; */ function time_required($goal_step, $slowdown_factor) { return $slowdown_factor * ($goal_step*($goal_step+1)/2); } function target_time($current_step_time, $current_step, $goal_step, $slowdown_factor) { // f: Slowdown factor // t(s): time required to reach step s // epsilon: time required for step 0 (is close to 0 secs) // t(s) = SUM(1*f + 2*f + ... + s*f) + epsilon // = f * SUM(1+2+...+s) + epsilon // = f * (s(s+1)/2) if (is_null($current_step_time)) { return time() + (time_required($goal_step, $slowdown_factor) - time_required($current_step, $slowdown_factor)); } else { return $current_step_time + (time_required($goal_step, $slowdown_factor) - time_required($current_step, $slowdown_factor)); } } // echo "Step ".count($r2013)." will be reached at: " . date('Y-m-d H:i:s', target_time(filemtime($fn2017), count($r2017), count($r2013), immort_slowdown_factor($fn2017)));