A parte il fatto che basta
per implementare quella formula:codice:echo pi();
codice:<?php $sign = 1; $quot = 0; for ($x = 1; $x < 2000; $x += 2) { $quot += $sign * 1/$x; $sign *= -1; } echo 4 * $quot; ?>
A parte il fatto che basta
per implementare quella formula:codice:echo pi();
codice:<?php $sign = 1; $quot = 0; for ($x = 1; $x < 2000; $x += 2) { $quot += $sign * 1/$x; $sign *= -1; } echo 4 * $quot; ?>