Forum: Ruby-core [Ruby 1.9 - Feature #4897][Open] Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2

Posted by Simon Baird (Guest)
on 2011-06-18 00:46
(Received via mailing list)
Issue #4897 has been reported by Simon Baird.

----------------------------------------
Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle 
constant, Tau=2*Pi. See http://tauday.com/
http://redmine.ruby-lang.org/issues/4897

Author: Simon Baird
Status: Open
Priority: Low
Assignee:
Category: core
Target version: 1.9.x


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.
Posted by Simon Baird (Guest)
on 2011-06-18 01:28
(Received via mailing list)
Issue #4897 has been updated by Simon Baird.


Sorry for the too long title. Don't know how to edit. Suggested title: 
"Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi"
----------------------------------------
Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle 
constant, Tau=2*Pi. See http://tauday.com/
http://redmine.ruby-lang.org/issues/4897

Author: Simon Baird
Status: Open
Priority: Low
Assignee:
Category: core
Target version: 1.9.x


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.
Posted by Simon Baird (Guest)
on 2011-06-18 01:29
(Received via mailing list)
Issue #4897 has been updated by Simon Baird.


"Direct link to gist":https://gist.github.com/1029552
----------------------------------------
Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle 
constant, Tau=2*Pi. See http://tauday.com/
http://redmine.ruby-lang.org/issues/4897

Author: Simon Baird
Status: Open
Priority: Low
Assignee:
Category: core
Target version: 1.9.x


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.
Posted by Simon Baird (Guest)
on 2011-06-18 01:41
(Received via mailing list)
Issue #4897 has been updated by Simon Baird.


Clickable link to <a href="http://tauday.com/">http://tauday.com/</a>
----------------------------------------
Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle 
constant, Tau=2*Pi. See http://tauday.com/
http://redmine.ruby-lang.org/issues/4897

Author: Simon Baird
Status: Open
Priority: Low
Assignee:
Category: core
Target version: 1.9.x


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.
Posted by mame (Yusuke Endoh) (Guest)
on 2012-03-25 09:24
(Received via mailing list)
Issue #4897 has been updated by mame (Yusuke Endoh).

Category changed from core to Joke
Status changed from Open to Feedback


----------------------------------------
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-25136

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
Target version: 2.0.0


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.
Posted by "duerst (Martin Dürst)" <duerst@it.aoyama.ac.jp> (Guest)
on 2012-03-25 09:31
(Received via mailing list)
Issue #4897 has been updated by duerst (Martin Dürst).


We have discussed this at today's developers' meeting in Akihabara.

We highly doubt that there are many mathematicians, physicists, 
engineers, and so on, who use τ. Once τ is widely accepted in these 
communities, we might add it.
----------------------------------------
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-25139

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
Target version: 2.0.0


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.
Posted by Thomas Sawyer (7rans)
on 2012-03-25 16:58
(Received via mailing list)
Issue #4897 has been updated by trans (Thomas Sawyer).


I'm trying to get used to the idea of eating a pizza taue, myself. :-)

This is the classic chicken and egg situation -- "We'll do it if it's 
popular", but "It won't get popular unless people do it".

I think Tau=2*Pi is a good idea. So if it were just up to me, I'd add it 
just to show support. It's a rather tiny and harmless addition.
----------------------------------------
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-25168

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
Target version: 2.0.0


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.
Posted by ko1 (Koichi Sasada) (Guest)
on 2012-10-26 23:15
(Received via mailing list)
Issue #4897 has been updated by ko1 (Koichi Sasada).

Target version changed from 2.0.0 to Next Major


----------------------------------------
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-31664

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by Thomas Sawyer (7rans)
on 2013-02-24 11:21
(Received via mailing list)
Issue #4897 has been updated by trans (Thomas Sawyer).


Could these patch be applied now? As previously said, it's a good thing 
to show support for and it's a rather tiny and otherwise harmless 
addition.
----------------------------------------
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-36899

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by sbaird (Simon Baird) (Guest)
on 2013-02-25 14:42
(Received via mailing list)
Issue #4897 has been updated by sbaird (Simon Baird).


https://github.com/search?q=%22TAU+%3D+2+%2A+Math....

https://github.com/search?q=%22TAU+%3D+PI+*+2%22&t...
----------------------------------------
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-36997

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by Nobuyoshi Nakada (nobu)
on 2013-02-26 10:21
(Received via mailing list)
Issue #4897 has been updated by nobu (Nobuyoshi Nakada).


Why is it called as τ, half of π?
----------------------------------------
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-37090

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by Matthew Kerwin (mattyk)
on 2013-02-26 11:08
(Received via mailing list)
On 26 February 2013 19:20, nobu (Nobuyoshi Nakada) 
<nobu@ruby-lang.org>wrote:

>
> Why is it called as , half of ?
>

It's actually two of .  The reason for the name is justified here:
http://tauday.com/tau-manifesto#sec:one_turn

In summary: tau is the first letter of the Greek word "tornos" (lathe),
which is the root of the English word "turn;" and the tau constant 
(2*PI)
is the ratio of a circle's radius to its circumference (i.e. one 
_turn_.)
Also "the horizontal line in each letter suggests that we interpret the
"legs" as _*denominators_*, so that  has two legs in its denominator,
while  has only one. Seen this way, the relationship =2 is perfectly
natural."

--
  Matthew Kerwin, B.Sc (CompSci) (Hons)
  http://matthew.kerwin.net.au/
  ABN: 59-013-727-651

  "You'll never find a programming language that frees
  you from the burden of clarifying your ideas." - xkcd
Posted by Matthew Kerwin (mattyk)
on 2013-02-26 11:13
(Received via mailing list)
Issue #4897 has been updated by phluid61 (Matthew Kerwin).


nobu (Nobuyoshi Nakada) wrote:
> Why is it called as τ, half of π?

It's actually two of π.  The reason for the name is justified here: 
http://tauday.com/tau-manifesto#sec:one_turn

In summary: tau is the first letter of the Greek word "tornos" (lathe), 
which is the root of the English word "turn;" and the tau constant 
(2*PI) is the ratio of a circle's radius to its circumference (i.e. one 
_turn_.)  Also "the horizontal line in each letter suggests that we 
interpret the “legs” as _denominators_, so that π has two legs in its 
denominator, while τ has only one. Seen this way, the relationship τ=2π 
is perfectly natural."
----------------------------------------
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-37094

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by Student Jr (student)
on 2013-02-27 01:27
(Received via mailing list)
Issue #4897 has been updated by Student (Nathan Zook).


Please, just say no.  This garbage is one and only thing that has made 
me really glad that I decided to leave academia.  Having to dissuade 
every crank from this idea would ruin my mood for weeks.

There a large number of excellent candidate constants to be included. 
There is absolutely no cause to include constants that are power-of-two 
multiples of each other.  You want tau in math?  Fine.  module Math ; 
TAU = 2 * PI ; end.  Done.  Put that in all your files.  Move it to your 
initialization code.  Publish a gem.  I don't care.  But don't waste the 
time of people who understand that shifting a binary point by 1 really 
isn't a big deal.

-Math::PI

----------------------------------------
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-37123

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by bug (Harrison Reiser) (Guest)
on 2013-02-27 05:41
(Received via mailing list)
Issue #4897 has been updated by bug (Harrison Reiser).


Wow, such vitriol !  I could point out a correlation between it and your 
stance on academia, but I would be flying in the face of not only 
courtesy but also the whole point of all this.  I assure you that tau is 
not a joke, and has everything to do with mere common sense, both in 
pedagogy and practice (which, as it were, seems to be what many have 
come to know Ruby for).

While, as you say, not having the full circle constant is "not a big 
deal" given a simple means to derive it, I would be shocked to learn 
that any practiced programmer makes use of pi alone more often than 
2*pi.  For this very reason many libraries for other languages include 
both constants, not just for coding efficiency but for _runtime_ 
efficiency.  So far, this constant has almost ubiquitously been named 
TWO_PI (or some variation thereof) simply by convention, but the fact of 
its prevalence should be enough indication of its _independent 
usefulness_ (an important distinction, one which I have no intention of 
debating further, having already been, repeatedly and at length -- see 
https://en.wikipedia.org/wiki/User:Waldir/Tau for examples).

Now, dynamic languages such as Ruby and Python stand in a unique 
position.  As intuitiveness and coder efficiency are among their primary 
goals, they indeed have no reason to include a constant named TWO_PI, 
which would overall detract from these goals.  However, a constant named 
TAU would serve as an indication that this number has some distinction 
of its own, namely the aforementioned independent usefulness.  Therefore 
if it is to be included at all it should be with conviction rather than 
the attitude of mere quiet tolerance (as of a vocal minority), as it 
would indeed stand as a statement to the programming community.

The decision to postpone its addition until recognition spreads further 
is reasonable, but as trans mentioned it perpetuates the chicken and egg 
problem.  Either way, I hope I have raised sufficient objection to 
categorizing this issue as a "Joke".

-bug
----------------------------------------
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-37131

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-27 06:08
(Received via mailing list)
Issue #4897 has been updated by drbrain (Eric Hodel).


=begin

Despite all the argument for this constant, nobody has provided a patch, 
so it seems like a joke.

Runtime performance of a constant lookup is 3% +/- 1.2% faster than 
multiplying a float by 2 on my machine over 20 million multiplications. 
3% for a built-in constant doesn't seem like a big deal.

I don't trust a wikipedia user page as a reference, it doesn't go 
through the same vetting process as a regular wikipedia page.

Benchmarks:

  $ cat bm.rb
  require 'benchmark'

  module Math
    TAU = 2*Math::PI
  end

  range = Float::EPSILON..10.0

  N = Integer ARGV.shift

  case ARGV.shift
  when 'tau' then
    puts Benchmark.measure {
      N.times do
        2 * Math::PI * rand(range)
      end
    }.real
  when '2pi' then
    puts Benchmark.measure {
      N.times do
        2 * Math::TAU * rand(range)
      end
    }.real
  else
    abort "#{$0} N tau|2pi"
  end
  $ for i in `jot 20`; do ruby bm.rb 1_000_000 2pi; done > 2pi.txt
  $ for i in `jot 20`; do ruby bm.rb 1_000_000 tau; done > tau.txt
  $ ministat tau.txt 2pi.txt
  x tau.txt
  + 2pi.txt
  +------------------------------------------------------------------------------+
  |x    xx    x    +   +     +    +      + 
|
  |x x x*xxx+ x * x+   * ++x +++  +     ++        + 
+|
  | |____M_A___|_|___________MA_______________| 
|
  +------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg 
Stddev
  x  20      0.486589      0.504393      0.491397    0.49242015 
0.0049904288
  +  20      0.490699      0.544828      0.506571     0.5073239 
0.011828075
  Difference at 95.0% confidence
    0.0149037 +/- 0.00581011
    3.02663% +/- 1.17991%
    (Student's t, pooled s = 0.00907766)

=end
----------------------------------------
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-37132

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by Thomas Sawyer (7rans)
on 2013-02-27 06:14
(Received via mailing list)
Issue #4897 has been updated by trans (Thomas Sawyer).


> Despite all the argument for this constant, nobody has provided a patch, so it 
seems like a joke.

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


----------------------------------------
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-37133

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by Matthew Kerwin (mattyk)
on 2013-02-27 06:32
(Received via mailing list)
Issue #4897 has been updated by phluid61 (Matthew Kerwin).

File tau.patch added

drbrain (Eric Hodel) wrote:
> Despite all the argument for this constant, nobody has provided a patch, so it 
seems like a joke.

The gist linked in Comment 2 was a diff/patch, althought it's outdated 
and no longer applies cleanly.  I've attached a new patch (generated 
using `git diff`).  Please let me know if I'm supposed to generate it 
with --no-prefix
----------------------------------------
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-37134

Author: sbaird (Simon Baird)
Status: Feedback
Priority: Low
Assignee:
Category: Joke
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.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-27 06:56
(Received via mailing list)
Issue #4897 has been updated by drbrain (Eric Hodel).

Status changed from Feedback to Assigned
Assignee set to matz (Yukihiro Matsumoto)

The patch is fine.
----------------------------------------
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-37135

Author: sbaird (Simon Baird)
Status: Assigned
Priority: Low
Assignee: matz (Yukihiro Matsumoto)
Category: Joke
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.
Posted by "Martin J. Dürst" <duerst@it.aoyama.ac.jp> (Guest)
on 2013-02-27 09:18
(Received via mailing list)
Hello Eric,

I'm confused by the code below. First, it uses Math::PI with the 'tau'
option, and Math::TAU with the '2pi' option. Second, even when using
Math::TAU, it includes a multiplication by 2.

Regards,   Martin.
Posted by marcandre (Marc-Andre Lafortune) (Guest)
on 2013-02-27 17:14
(Received via mailing list)
Issue #4897 has been updated by marcandre (Marc-Andre Lafortune).

Category changed from Joke to core

duerst (Martin Dürst) wrote:
> Hello Eric,
>
>  Second, even when using
>  Math::TAU, it includes a multiplication by 2.

Right, I'd say the test doesn't say much... Actually, any difference 
apparently measured has to be meaningless, there's to intrinsic 
difference in either cases.

For what it's worth:

require 'fruity'

module Math
  TAU = 2 * PI
end
compare do
  pi  { Math.cos(2 * Math::PI) }
  tau { Math.cos(Math::TAU) }
end
# => tau is faster than pi by 50.0% ± 10.0%

I had to call Math.cos, because otherwise just accessing Math::TAU is 
too difficult to time.

Math currently has 2 constants.
I don't see a huge downside in increasing this. On the other hand, TAU 
is so easy to calculate, I would trust that anyone knowing of it's 
existence would simply define it.
----------------------------------------
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-37154

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.
Posted by David MacMahon (Guest)
on 2013-02-27 18:16
(Received via mailing list)
I vote -1 on this idea because the name "TAU" is used in a number of 
fields to represent a wide variety of things:

http://en.wikipedia.org/wiki/Greek_letters_used_in...

For example, tau as also used as a constant representing the golden 
ratio (1.618...).

The names "PI" and "E" are used far more consistently across fields. 
Giving special preference to one (proposed!) use of the name "TAU" seems 
unfair to the other (established!) uses.

How about making a "twopi" gem that defines Math::TAU and BigMath.TAU? 
If it is as useful as its proponents claim, it will undoubtedly become a 
very popular gem and the public outcry to add it to the core of the 
language will be deafening.

Dave
Posted by JosephLindenberg (Joseph Lindenberg) (Guest)
on 2013-02-27 23:20
(Received via mailing list)
Issue #4897 has been updated by JosephLindenberg (Joseph Lindenberg).


The Processing programming language recently added TAU:
     http://code.google.com/p/processing/source/browse/...

It does seem to be showing up more and more frequently.  Here's a recent 
SAMS book where the author uses it in his examples:
     http://books.google.com/books?id=BFda3Z71Y5YC&prin...

I'm in favor of adding TAU.  It's definitely not the same as having a 
bunch of multiples and submultiples of a constant.  In fact, you really 
could say that right now, we have the submultiple-of-a-constant 
HALF_TAU, just under a different name.

----------------------------------------
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-37168

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.
Posted by Matthew Kerwin (mattyk)
on 2013-02-27 23:20
(Received via mailing list)
Issue #4897 has been updated by phluid61 (Matthew Kerwin).

File tau.patch added

I just noticed a stupid typo in the patch I submitted. Sorry.
----------------------------------------
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-37167

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.
Posted by JosephLindenberg (Joseph Lindenberg) (Guest)
on 2013-02-27 23:39
(Received via mailing list)
Issue #4897 has been updated by JosephLindenberg (Joseph Lindenberg).


david_macmahon (David MacMahon) wrote:
>  For example, tau is also used as a constant representing the golden ratio 
(1.618...).

No, not anymore.  φ (phi) is used for that now.
----------------------------------------
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-37169

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.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-28 21:51
(Received via mailing list)
Issue #4897 has been updated by drbrain (Eric Hodel).


=begin
Martin, you are right.  With a corrected benchmark there is an 8.5% +/- 
1.2%:

  x tau.txt
  + 2pi.txt
  +--------------------------------------------------------------------------+
  |xx      x x                              + +      +     + 
|
  |xx x    xxxx x x           x    +  + + + + +++ +  + +  ++   + + 
+|
  | |______A_____|                       |________MA_________| 
|
  +--------------------------------------------------------------------------+
      N           Min           Max        Median           Avg 
Stddev
  x  20      0.526745      0.557717      0.535967     0.5353094 
0.0073255609
  +  20      0.562776       0.60921      0.579785     0.5810366 
0.011508619
  Difference at 95.0% confidence
    0.0457272 +/- 0.00617423
    8.5422% +/- 1.15339%
    (Student's t, pooled s = 0.00964656)

=end

----------------------------------------
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-37198

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.
Posted by alexeymuranov (Alexey Muranov) (Guest)
on 2013-02-28 22:15
(Received via mailing list)
Issue #4897 has been updated by alexeymuranov (Alexey Muranov).


+1
----------------------------------------
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-37199

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.
Posted by marcandre (Marc-Andre Lafortune) (Guest)
on 2013-02-28 22:37
(Received via mailing list)
Issue #4897 has been updated by marcandre (Marc-Andre Lafortune).


drbrain (Eric Hodel) wrote:
> Martin, you are right.  With a corrected benchmark there is an 8.5% +/- 1.2% 
improvement:

To be more accurate, you'd have to subtract the time of an empty loop. 
If you compare 42 * pi with 42 *pi; 42 * pi using your technique, you 
won't get the expected answer (100%). I get ~50% with your technique.

I should introduce some of the techniques in ministat in my fruity gem.

----------------------------------------
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-37200

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.
Posted by sbaird (Simon Baird) (Guest)
on 2013-03-01 01:41
(Received via mailing list)
Issue #4897 has been updated by sbaird (Simon Baird).


david_macmahon (David MacMahon) wrote:
>  I vote -1 on this idea because the name "TAU" is used in a number of fields to 
represent a wide variety of things:
>  For example, tau as also used as a constant representing the golden ratio 
(1.618...).
>

mhartl addresses this here:
http://tauday.com/tau-manifesto#sec:ambiguous_notation
----------------------------------------
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-37207

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.
Posted by sbaird (Simon Baird) (Guest)
on 2013-03-01 01:46
(Received via mailing list)
Issue #4897 has been updated by sbaird (Simon Baird).


I don't think the benchmarks are particularly relevant here. We should 
define Tau because it's important, not for any performance benefit.
----------------------------------------
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-37208

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.
Posted by Eregon (Benoit Daloze) (Guest)
on 2013-03-01 12:06
(Received via mailing list)
Issue #4897 has been updated by Eregon (Benoit Daloze).


sbaird (Simon Baird) wrote:
> I don't think the benchmarks are particularly relevant here. We should define 
Tau because it's important, not for any performance benefit.

Indeed.

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.
----------------------------------------
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-37220

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.
Posted by bug (Harrison Reiser) (Guest)
on 2013-04-13 19:58
(Received via mailing list)
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.