Partial sum of the reciprocals of the squares of the integers
Seeking Objectivity

set_params(); //get the values list($total,$num,$pi26,$diff,$exclamation) = $series->get_values(); //display the values echo "
"; echo "

The ".$num."'th partial sum = " . $total."

"; echo "
"; echo "

PI^2/6 = " . $pi26."

"; echo "
"; echo "

The difference is = ".$diff."

"; echo "
"; echo "

The evidence is ".$exclamation."!

"; echo "
"; echo "

by Tom Veile

"; echo "

for the

"; echo "

Facebook

"; echo "

not just tiny-C Programming Group

"; echo "

Revised: January 13, 2011

"; class Series { public $harms = 0; public $total = 0; public $pi26 = 0; public $diff = 0; public $reit = 0; public $exclamation = array(); public $selection = ''; public function set_params($h = 1, $t = 0, $p = 0, $d = 0, $r = 0){ $this->harms = $h; $this->total = $t; $this->pi26 = $p; $this->diff = $d; $this->reit = $r; $this->exclamation = array('incontrovertible','indisputable','undeniable','unquestionable'); } public function get_values(){ $data = array(); for ($this->harms; $this->harms <= 8000000; $this->harms++){ $this->total += 1/(pow($this->harms,2));} $this->total = round($this->total,7); $this->reit = $this->harms - 1; $this->pi26 = round(pow(pi(),2)/6,7); $this->diff = $this->total - $this->pi26; shuffle($this->exclamation); $this->selection = $this->exclamation[0]; array_push($data, $this->total, $this->reit, $this->pi26, $this->diff, $this->selection); return($data); } } ?>