Famous remark in a Xerox FORTRAN manual explaining the purpose of constant definitions: defining PI as a constant will prove useful "should the value of pi change".

In FORTRAN, thanks to its call by value return argument passing semantics and the implementation of constants as references, it is actually possible for programs to change the value of constants.

I guess I'll mention something interesting I read in Elegant Universe by Brian Greene when he was covering relativity. As long as you're sticking to two dimensions, pi is constant. However, in the real world, pi can appear to be variable. The trick is that space compresses in the direction of momentum.

Greene's example used two people measuring circumference and diameter of that spinning room at the amusement park. Both guys will get the same diameter, but because the room is moving relative to the guy outside and space compresses in the direction of the motion, the circumference measured by the person outside the ride will appear to be smaller than the circumference measured by the person inside the ride. If they both calculate pi (circumference over diameter) using their measurements, the guy who was inside the room will get a larger value of pi than the other.

As an example you can actually try at home, draw a circle on a deflated balloon. If an object is rotating, the center isn't moving but the outside is so when space-time bends you get a spherical shape much like the balloon when it is inflated. If you measure circumference and diameter of the balloon when it's deflated, and then again when it's inflated, you'll see that pi will appear to be smaller when the balloon is inflated.

But no worries, pi really is constant. It's caused by measuring something with equipment that can't deal with all the dimensions involved.

I'm surprised no-one has noted the obvious situation in which the value of PI might change. It's not π the natural constant the manual is talking about, it's PI the variable in a program, to be run on a machine constrained by finite storage and precision.

Depending on your decade, your machine, and your purpose, you might start out with CONST PI = 3.1416 then gradually refine it as you get more storage or need more precision. A one-line change to CONST PI = 3.14159 and beyond makes perfect sense.

Log in or registerto write something here or to contact authors.