<link rel="self" href="https://redmine.ruby-lang.org/issues/4897.atom"/>
<link rel="alternate" href="https://redmine.ruby-lang.org/"/>
<id>https://redmine.ruby-lang.org/</id>
<icon>https://redmine.ruby-lang.org/favicon.ico?1558831045</icon>
<updated>2011-06-18T08:26:16Z</updated>
<author>
<name>Ruby Issue Tracking System</name>
</author>
<entry>
<title>Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=180672011-06-18T08:26:16Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>Sorry for the too long title. Don't know how to edit. Suggested title:</p>
<p>Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=180682011-06-18T08:28:53Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>Direct link to the gist containing my patch:<br>
<a href="https://gist.github.com/1029552">https://gist.github.com/1029552</a></p>
<p>Edit: mention this is a patch (pluid61's patch is better though)</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=180692011-06-18T08:33:45Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>See <a href="http://tauday.com/">http://tauday.com/</a></p>
<p>Edit: particularly <a href="http://tauday.com/tau-manifesto">http://tauday.com/tau-manifesto</a></p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=251362012-03-25T16:23:59Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Category</strong> changed from <i>core</i> to <i>Joke</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul> Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=251392012-03-25T16:29:32Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>We have discussed this at today's developers' meeting in Akihabara.</p>
<p>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.</p>
<p>Just as a personal comment, I prefer π to τ because I can eat a pie, but not a tau :-)</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=251682012-03-25T23:57:28Ztrans (Thomas Sawyer)
<ul></ul><p>I'm trying to get used to the idea of eating a pizza taue, myself. :-)</p>
<p>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".</p>
<p>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.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=316642012-10-27T06:13:31Zko1 (Koichi Sasada)
<ul><li><strong>Target version</strong> changed from <i>2.0.0</i> to <i>Next Major</i></li></ul> Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=368992013-02-24T19:17:42Ztrans (Thomas Sawyer)
<ul></ul><p>Could this 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.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=369972013-02-25T22:34:34Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p><a href="https://github.com/search?q=%22TAU+%3D+2+%2A+Math.PI%22&type=Code">https://github.com/search?q=%22TAU+%3D+2+%2A+Math.PI%22&type=Code</a></p>
<p><a href="https://github.com/search?q=%22TAU+%3D+PI+*+2%22&type=Code">https://github.com/search?q=%22TAU+%3D+PI+*+2%22&type=Code</a></p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=370902013-02-26T18:20:44Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Why is it called as τ, half of π?</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=370942013-02-26T19:12:44Zphluid61 (Matthew Kerwin)matthew@kerwin.net.au
<ul></ul><p>nobu (Nobuyoshi Nakada) wrote:</p>
<blockquote>
<p>Why is it called as τ, half of π?</p>
</blockquote>
<p>It's actually two of π. The reason for the name is justified here: <a href="http://tauday.com/tau-manifesto#sec:one_turn">http://tauday.com/tau-manifesto#sec:one_turn</a></p>
<p>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 <u>turn</u>.) Also "the horizontal line in each letter suggests that we interpret the “legs” as <u>denominators</u>, so that π has two legs in its denominator, while τ has only one. Seen this way, the relationship τ=2π is perfectly natural."</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=370952013-02-26T19:23:18Zphluid61 (Matthew Kerwin)matthew@kerwin.net.au
<ul></ul><p>On 26 February 2013 19:20, nobu (Nobuyoshi Nakada) <a href="mailto:nobu@ruby-lang.org">nobu@ruby-lang.org</a>wrote:</p>
<blockquote>
<p>Why is it called as τ, half of π?</p>
</blockquote>
<p>It's actually two of π. The reason for the name is justified here:<br>
<a href="http://tauday.com/tau-manifesto#sec:one_turn">http://tauday.com/tau-manifesto#sec:one_turn</a></p>
<p>In summary: tau is the first letter of the Greek word "tornos" (lathe),<br>
which is the root of the English word "turn;" and the tau constant (2*PI)<br>
is the ratio of a circle's radius to its circumference (i.e. one <u>turn</u>.)<br>
Also "the horizontal line in each letter suggests that we interpret the<br>
"legs" as <u>*denominators</u>*, so that π has two legs in its denominator,<br>
while τ has only one. Seen this way, the relationship τ=2π is perfectly<br>
natural."</p>
<p>EDIT: apologies for the double-posting. I'm not quite sure how I managed it.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371232013-02-27T09:26:38ZStudent (Nathan Zook)blogger@pierian-spring.net
<ul></ul><p>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.</p>
<p>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. <code>module Math ; TAU = 2 * PI ; end</code>. 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.</p>
<p>-Math::PI</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371312013-02-27T13:41:03Zbug (Harrison Reiser)mixtabug@gmail.com
<ul></ul><p>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).</p>
<p>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 <u>runtime</u> 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 <u>independent usefulness</u> (an important distinction, one which I have no intention of debating further, having already been, repeatedly and at length -- see <a href="https://en.wikipedia.org/wiki/User:Waldir/Tau">https://en.wikipedia.org/wiki/User:Waldir/Tau</a> for examples).</p>
<p>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.</p>
<p>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".</p>
<p>-bug</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371322013-02-27T14:08:11Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Despite all the argument for this constant, nobody has provided a patch, so it seems like a joke.</p>
<p>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.</p>
<p>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.</p>
<p>Benchmarks:</p>
<pre> $ 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)
</pre> Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371332013-02-27T14:13:59Ztrans (Thomas Sawyer)
<ul></ul><blockquote>
<p>Despite all the argument for this constant, nobody has provided a patch, so it seems like a joke.</p>
</blockquote>
<p>"Here is a patch on trunk that implements this: <a href="http://simonbaird.blogspot.com/2011/06/tau-in-ruby.html">http://simonbaird.blogspot.com/2011/06/tau-in-ruby.html</a>"</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371342013-02-27T14:25:45Zphluid61 (Matthew Kerwin)matthew@kerwin.net.au
<ul><li><strong>File</strong> <a href="/attachments/3552">tau.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3552/tau.patch">tau.patch</a> added</li></ul><p>drbrain (Eric Hodel) wrote:</p>
<blockquote>
<p>Despite all the argument for this constant, nobody has provided a patch, so it seems like a joke.</p>
</blockquote>
<p>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 <code>git diff</code>). Please let me know if I'm supposed to generate it with --no-prefix</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371352013-02-27T14:52:46Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>The patch is fine.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371372013-02-27T17:23:18Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>Hello Eric,</p>
<p>I'm confused by the code below. First, it uses Math::PI with the 'tau' <br>
option, and Math::TAU with the '2pi' option. Second, even when using <br>
Math::TAU, it includes a multiplication by 2.</p>
<p>Regards, Martin.</p>
<p>On 2013/02/27 14:08, drbrain (Eric Hodel) wrote:</p>
<blockquote>
<p>Benchmarks:</p>
<pre> $ 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
</pre></blockquote>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371542013-02-28T01:13:08Zmarcandre (Marc-Andre Lafortune)ruby-core@marc-andre.ca
<ul><li><strong>Category</strong> changed from <i>Joke</i> to <i>core</i></li></ul><p>duerst (Martin Dürst) wrote:</p>
<blockquote>
<p>Hello Eric,</p>
<p>Second, even when using <br>
Math::TAU, it includes a multiplication by 2.</p>
</blockquote>
<p>Right, I'd say the test doesn't say much... Actually, any difference apparently measured has to be meaningless, there's no intrinsic difference in either cases.</p>
<p>For what it's worth:</p>
<pre>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%
</pre>
<p>I had to call Math.cos, because otherwise just accessing Math::TAU is too difficult to time.</p>
<p>Math currently has 2 constants (PI and E)<br>
I don't see a huge downside in increasing this. On the other hand, TAU is so easy to define, I would trust that anyone knowing of it's existence would simply define it.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371582013-02-28T02:23:19Zdavid_macmahon (David MacMahon)davidm@astro.berkeley.edu
<ul></ul><p>I vote -1 on this idea because the name "TAU" is used in a number of fields to represent a wide variety of things:</p>
<p><a href="http://en.wikipedia.org/wiki/Greek_letters_used_in_mathematics,_science,_and_engineering#.CE.A4.CF.84_.28tau.29">http://en.wikipedia.org/wiki/Greek_letters_used_in_mathematics,_science,_and_engineering#.CE.A4.CF.84_.28tau.29</a></p>
<p>For example, tau as also used as a constant representing the golden ratio (1.618...).</p>
<p>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.</p>
<p>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.</p>
<p>Dave</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371672013-02-28T07:10:43Zphluid61 (Matthew Kerwin)matthew@kerwin.net.au
<ul><li><strong>File</strong> <a href="/attachments/3558">tau.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3558/tau.patch">tau.patch</a> added</li></ul><p>I just noticed a stupid typo in the patch I submitted. Sorry.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371682013-02-28T07:10:54ZJosephLindenberg (Joseph Lindenberg)josephlindenberg@yahoo.com
<ul></ul><p>The Processing programming language recently added TAU:<br>
<a href="http://code.google.com/p/processing/source/browse/trunk/processing/core/src/processing/core/PConstants.java">http://code.google.com/p/processing/source/browse/trunk/processing/core/src/processing/core/PConstants.java</a></p>
<p>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:<br>
<a href="http://books.google.com/books?id=BFda3Z71Y5YC&printsec=frontcover">http://books.google.com/books?id=BFda3Z71Y5YC&printsec=frontcover</a></p>
<p>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.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371692013-02-28T07:38:55ZJosephLindenberg (Joseph Lindenberg)josephlindenberg@yahoo.com
<ul></ul><p>david_macmahon (David MacMahon) wrote:</p>
<blockquote>
<p>For example, tau is also used as a constant representing the golden ratio (1.618...).</p>
</blockquote>
<p>No, not anymore. φ (phi) is used for that now.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371982013-03-01T05:50:16Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Martin, you are right. With a corrected benchmark there is an 8.5% +/- 1.2% improvement:</p>
<pre> 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)
</pre> Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=371992013-03-01T06:15:02Zalexeymuranov (Alexey Muranov)
<ul></ul><p>+1</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=372002013-03-01T06:34:57Zmarcandre (Marc-Andre Lafortune)ruby-core@marc-andre.ca
<ul></ul><p>drbrain (Eric Hodel) wrote:</p>
<blockquote>
<p>Martin, you are right. With a corrected benchmark there is an 8.5% +/- 1.2% improvement:</p>
</blockquote>
<p>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.</p>
<p>I should introduce some of the techniques in ministat in my fruity gem.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=372072013-03-01T09:37:27Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>david_macmahon (David MacMahon) wrote:</p>
<blockquote>
<p>I vote -1 on this idea because the name "TAU" is used in a number of fields to represent a wide variety of things:<br>
For example, tau as also used as a constant representing the golden ratio (1.618...).</p>
</blockquote>
<p>mhartl addresses this here:<br>
<a href="http://tauday.com/tau-manifesto#sec:ambiguous_notation">http://tauday.com/tau-manifesto#sec:ambiguous_notation</a></p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=372082013-03-01T09:46:20Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>I don't think the benchmarks are particularly relevant here. We should define Tau because it's important, not for any performance benefit.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=372202013-03-01T20:05:59ZEregon (Benoit Daloze)
<ul></ul><p>sbaird (Simon Baird) wrote:</p>
<blockquote>
<p>I don't think the benchmarks are particularly relevant here. We should define Tau because it's important, not for any performance benefit.</p>
</blockquote>
<p>Indeed.</p>
<p>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.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=385322013-04-14T02:57:38Zbug (Harrison Reiser)mixtabug@gmail.com
<ul></ul><p>Eregon (Benoit Daloze) wrote:</p>
<blockquote>
<p>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.</p>
</blockquote>
<p>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<sup>2),</sup> for which the circle formula is a special case: 1/2 * tau * r<sup>2</sup> = pi * r<sup>2.</sup> 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 such special cases.)</p>
<p>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.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=474322014-06-28T08:49:29Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>Since today is 6/28, here's a pull request on trunk:</p>
<ul>
<li><a href="https://github.com/ruby/ruby/pull/644">https://github.com/ruby/ruby/pull/644</a></li>
</ul>
<p>See also:</p>
<ul>
<li><a href="http://tauday.com/state-of-the-tau">http://tauday.com/state-of-the-tau</a></li>
</ul>
<p>Best wishes and Happy Tau Day... :)</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=532392015-07-02T07:36:58Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>I'm a bit late, but here it is rebased for Tau Day 2015:</p>
<ul>
<li><a href="https://github.com/ruby/ruby/pull/644">https://github.com/ruby/ruby/pull/644</a></li>
</ul>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=534772015-07-20T23:05:18Zmrkn (Kenta Murata)muraken@gmail.com
<ul></ul><p>As I wrote in <a href="https://github.com/ruby/ruby/pull/644#issuecomment-123082639">https://github.com/ruby/ruby/pull/644#issuecomment-123082639</a>, I closed the pull-request for the present time.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=600572016-08-11T01:39:15Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>This may be of interest: Guido van Rossum recently reopened the Python version of this request and is going to add tau to Python. See <a href="https://bugs.python.org/issue12345">https://bugs.python.org/issue12345</a> .</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=608882016-10-14T03:12:58Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>At the developers' meeting this week, mrkn suggested <code>TWO_PI</code> instead.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=608892016-10-14T05:41:10Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>On 2016/10/14 13:35, RRRoy BBBean wrote:</p>
<blockquote>
<p>Would such an interconnected system be packaged as a bunch of individual<br>
gems, or is there some higher-level packaging concept than the Ruby gem?</p>
<p>I personally think gems are best when kept as small as possible, highly<br>
cohesive and highly coherent. But that creates a secondary problem? How<br>
to organize larger units of reusable code? I don't know.</p>
</blockquote>
<p>It's easy. Gems can depend on other gems. So we can have some highly <br>
cohesive and highly coherent gems at the bottom, and then other, more <br>
application-oriented gems that pull the necessary basic gems together. <br>
This can be done on more and more levels if necessary.</p>
<p>Composition is a great concept, and applying it recursively is even better.</p>
<p>Regards, Martin.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=608902016-10-14T06:42:08Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>Nobuyoshi Nakada wrote:</p>
<blockquote>
<p>At the developers' meeting this week, mrkn suggested <code>TWO_PI</code> instead.</p>
</blockquote>
<p>I don't think TWO_PI would be very useful since it misses the main point of tau, which is that tau is the correct circle constant, (and pi is a 2000 year old blunder)[1]. If you consider this diagram [2] with TWO_PI in place of tau, then it loses its meaning.</p>
<p>Defining HALF_TAU could be useful though. ;)</p>
<p>[1] Of course not everyone agrees on this, but <a href="http://tauday.com/tau-manifesto">http://tauday.com/tau-manifesto</a> is quite convincing IMO</p>
<p>[2] <a href="http://tauday.com/assets/figures/tau-angles.png">http://tauday.com/assets/figures/tau-angles.png</a></p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=608912016-10-14T08:38:25Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>Just to add my POV:</p>
<p>I'm a complete amateur in pure Mathematics. To me who is an outsider of academia, I can't say we should accept or reject this request right now. All I can say is it seems not widely used in papers for some reason I don't know. It's not clear to me wether the constant τ is just yet to receive wider acceptance because it's relatively young, or is actively receiving low marks from academic community. I'm just not sure.</p>
<p>This constant is a constant (by nature), so once introduced in ruby it's highly expected to stay defined forever. Because of this property I'm afraid of wrong decision. Is it really safe we add this? In order to make this sure I think we need either more time, or an expert's counsel, or maybe both.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=608992016-10-14T09:40:38Zsbaird (Simon Baird)simon.baird@gmail.com
<ul></ul><p>See also <a href="https://github.com/jneen/math-tau">https://github.com/jneen/math-tau</a> .</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=616662016-11-25T06:49:33Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Rejected</i></li></ul><p>For the time being, use <code>math-tau</code> gem.<br>
I will add it after (and only after) it became time-proven major, probably due to Python's tau.</p>
<p>Matz.</p>
Ruby trunk - Feature #4897: Define Math::TAU and BigMath.TAU. The "true" circle constant, Tau=2*Pi. See http://tauday.com/https://redmine.ruby-lang.org/issues/4897?journal_id=655612017-06-30T05:49:58Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-6 priority-4 priority-default closed" href="/issues/13694">Feature #13694</a>: Add Tau constant to Math</i> added</li></ul>