Issue #4897 has been updated by bug (Harrison Reiser).


Eregon (Benoit Daloze) wrote:
> Although I am not sure of the importance of having TAU. One PI is fine for unit conversions as well as computing the area of a circle. But there are also many cases of 2*PI, which sounds less-than-ideal.

They are more common than you would think.  Finding the area of circles is actually relatively specialized, in comparison with, for example, circular sectors (1/2 * angle * r^2), or even n-spheres ((n-1)/n * tau * r^n).

In both instances, the circle formula is a special case: 1/2 * tau * r^2 = pi * r^2.  The use of pi is an aesthetic optimization, not representative of any underlying geometric relationship.  (However, the use of pi in runtime optimization is still applicable for these special cases.)

This mere coincidence becomes even more obvious when looking at the derivation of the above formulae, and as with everything discussed heretofore, is already discussed in the Tau Manifesto.  Incidentally, I recommend anyone still wavering to read it for the benefit of making more informed opinions.
----------------------------------------
Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/
https://bugs.ruby-lang.org/issues/4897#change-38532

Author: sbaird (Simon Baird)
Status: Assigned
Priority: Low
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: Next Major


Firstly please read the Tau Manifesto at http://tauday.com/ . It's quite long but essential to understanding why this is a good idea.

Here is a patch on trunk that implements this:
http://simonbaird.blogspot.com/2011/06/tau-in-ruby.html

Allow me to anticipate and respond in advance to some common objections:

1. It's easy to define it yourself so why put this in core.
Possibly correct, but I think this is the right thing to do. Tau is important. And it's a pretty small patch.

2. If this constant goes in then pretty soon someone will want every other math constant and there are hundreds of them. (Slippery slope argument).
The circle constant is one of the two most important numbers is mathematics. It's not just another math constant. We already define Pi.


-- 
http://bugs.ruby-lang.org/