/usr/share/doc/hp48cc/examples/pi1.hpc is in hp48cc 1.3-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 | // pi1.hpc -- Calculate the pi (Algorithm 1) -*- C -*-
// k is the number of iterations
declare pi1(k): s(0) {
for (; k >= 0; --k)
s += (-1)**k/(2 * k + 1);
s * 4; // Return value
}
|