Skip to content

Add math.tau #56554

Closed
Closed

Description

@ncoghlan
BPO 12345
Nosy @tim-one, @birkenfeld, @rhettinger, @pfalcon, @mdickinson, @ncoghlan, @abalkin, @vstinner, @benjaminp, @merwok, @asmeurer, @serhiy-storchaka, @vedgar, @Shredder13, @lisroach, @AraHaan
PRs
  • [3.6] bpo-34901 - add isolated (-I) flag to sys.flags (GH-9708) #9755
  • Files
  • tau.diff
  • tau2.diff
  • tau3.diff
  • tau4.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gvanrossum'
    closed_at = <Date 2016-08-15.16:16:35.929>
    created_at = <Date 2011-06-16.03:10:29.721>
    labels = ['easy', 'type-feature']
    title = 'Add math.tau'
    updated_at = <Date 2018-10-08.22:18:18.242>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2018-10-08.22:18:18.242>
    actor = 'danishprakash'
    assignee = 'gvanrossum'
    closed = True
    closed_date = <Date 2016-08-15.16:16:35.929>
    closer = 'gvanrossum'
    components = []
    creation = <Date 2011-06-16.03:10:29.721>
    creator = 'ncoghlan'
    dependencies = []
    files = ['44063', '44065', '44080', '44111']
    hgrepos = []
    issue_num = 12345
    keywords = ['patch', 'easy']
    message_count = 63.0
    messages = ['138412', '138414', '138416', '138419', '138421', '138422', '138423', '138431', '138548', '138551', '138553', '139338', '183004', '183198', '272287', '272299', '272301', '272304', '272319', '272325', '272373', '272374', '272375', '272376', '272377', '272422', '272457', '272465', '272467', '272469', '272470', '272472', '272473', '272476', '272478', '272483', '272484', '272485', '272487', '272493', '272505', '272507', '272509', '272533', '272555', '272561', '272566', '272592', '272598', '272601', '272617', '272618', '272627', '272671', '272679', '272682', '272714', '272770', '272775', '272777', '272802', '313664', '313668']
    nosy_count = 20.0
    nosy_names = ['tim.peters', 'georg.brandl', 'rhettinger', 'pfalcon', 'mark.dickinson', 'ncoghlan', 'belopolsky', 'vstinner', 'benjamin.peterson', 'stutzbach', 'eric.araujo', 'Aaron.Meurer', 'python-dev', 'serhiy.storchaka', 'waldir', 'xcombelle', 'veky', 'Nofar Schnider', 'lisroach', 'Decorater']
    pr_nums = ['9755']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'commit review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue12345'
    versions = ['Python 3.6']

    Activity

    1. ncoghlan commented on Jun 16, 2011

      @ncoghlan
      ContributorAuthor

      I'd like to add a new constant to the math module:

        tau = 2*math.pi

      Rather than repeating all the reasons for why tau makes more sense than pi as the fundamental circle constant, I'll just refer interested readers to http://tauday.com/

    2. benjaminp commented on Jun 16, 2011

      @benjaminp
      Contributor

      Perhaps we should wait until \tau gains popularity larger than some impassioned physicist. \tau has been used to represent the golden ratio longer.

    3. rhettinger commented on Jun 16, 2011

      @rhettinger
      Contributor

      -1

    4. ncoghlan commented on Jun 16, 2011

      @ncoghlan
      ContributorAuthor

      The golden ratio is more commonly denoted with phi (although tau does get used sometimes).

      Popularity isn't the point though, it's the fact that tau *makes geometric sense* in ways that 2*pi doesn't.

    5. vstinner commented on Jun 16, 2011

      @vstinner
      Member

      I like this issue number, but I don't think that Python needs this new constant: it's trivial to add it to your own project. We have pi and e, it's enough. If we begin to add a new constant, others will ask to add much more constants, and there are million of other constants (useful or not). You may want to create a library of some other common constants. You can use float.fromhex() to have a good accuracy.

    6. pitrou commented on Jun 16, 2011

      @pitrou
      Member

      Nick, you just have to write: tau = 2 * math.pi
      and you're done.

      there are million of other constants

      Actually, I've heard there are an infinity of them.

    7. vstinner commented on Jun 16, 2011

      @vstinner
      Member

      Actually, I've heard there are an infinity of them.

      Can you prove that?

    8. benjaminp commented on Jun 16, 2011

      @benjaminp
      Contributor

      2011/6/16 STINNER Victor <[email protected]>:

      STINNER Victor <[email protected]> added the comment:

      > Actually, I've heard there are an infinity of them.

      Can you prove that?

      Don't have to. Axiom of infinity. :)

    9. stutzbach commented on Jun 17, 2011

      stutzbachmannequin
      Mannequin

      On Wed, Jun 15, 2011 at 8:10 PM, Nick Coghlan <[email protected]>wrote:

      I'd like to add a new constant to the math module:

      tau = 2*math.pi

      Rather than repeating all the reasons for why tau makes more sense than pi
      as the fundamental circle constant, I'll just refer interested readers to
      http://tauday.com/

      (The following is best if read aloud using your best pirate impression)

      I'd rather name the new constant "matey". Then we have:

      The circumference of a circle is: r matey
      The area of a circle is: one-quarter r r matey
      etc.

    10. mdickinson commented on Jun 17, 2011

      @mdickinson
      Member

      Not to mention d(area of circle of radius r) = r dr matey.

    11. birkenfeld commented on Jun 17, 2011

      @birkenfeld
      Member

      http://tauday.com/

      And I thought putting "dx" directly next to the integral sign was audacious...

    12. gvanrossum commented on Jun 27, 2011

      @gvanrossum
      Member

      Uh, not until I've seen a lot more evidence that people are habitually writing "TAU = 2 * math.pi" in their programs...

    13. 40 remaining items

    14. vedgar commented on Aug 13, 2016

      vedgarmannequin
      Mannequin

      As an Easter egg, of course. I'm all for it. But please take a look at https://docs.python.org/3.5/search.html?q=antigravity&check_keywords=yes&area=default

    15. AraHaan commented on Aug 13, 2016

      AraHaanmannequin
      Mannequin

      not to mention I like to use the following expression myself.

      pie = 22 / 7  # because why not?
      tau = 2 * pie
    16. pitrou commented on Aug 14, 2016

      @pitrou
      Member

      Unsubscribing from this ridiculous issue. Guido, do your thing.

    17. yan12125 commented on Aug 14, 2016

      yan12125mannequin
      Mannequin

      The documentation of tau should mention it's equal to 2 * pi.

    18. vstinner commented on Aug 14, 2016

      @vstinner
      Member

      Chi Hsuan Yen added the comment:

      The documentation of tau should mention it's equal to 2 * pi.

      According to this discussion, tau is very important. Maybe it's better to
      document pi as tau/2? :-)

    19. yan12125 commented on Aug 14, 2016

      yan12125mannequin
      Mannequin

      From http://tauday.com/

      No, really, pi is wrong...

      For me it's a sign that pi is (currently) more common than tau. One purpose of the documentation is helping newcomers understand what Python's built-in objects mean. "tau = 2 * pi" is better than "pi = tau / 2" as those who know pi only are more than those who know tau only.

    20. lisroach commented on Aug 15, 2016

      @lisroach
      Contributor

      I have added some more detail to the Tau documentation, including that Tau is 2 * pi, as well as some links to Tau Day and Vi Hart's video.

      That should give Python users enough to get started forming their own opinions on tau vs pi :)

    21. gvanrossum commented on Aug 15, 2016

      @gvanrossum
      Member

      Lisa, this LGTM. I'll commit it so we can put this behind us!

    22. python-dev commented on Aug 15, 2016

      python-devmannequin
      Mannequin

      New changeset 68f2d6098be1 by Guido van Rossum in branch 'default':
      Issue bpo-12345: Add mathemathcal constant tau to math and cmath.
      https://hg.python.org/cpython/rev/68f2d6098be1

    23. abalkin commented on Aug 15, 2016

      @abalkin
      Member

      There is a typo in the NEWS entry:

      "Issue bpo-12345: Add *mathemathcal* constant tau to math ..."

    24. gvanrossum commented on Aug 15, 2016

      @gvanrossum
      Member

      Thanks, fixed.

    25. mdickinson commented on Mar 12, 2018

      @mdickinson
      Member

      Why does this issue keep ending up as the target of unrelated PR notifications?

    26. serhiy-storchaka commented on Mar 12, 2018

      @serhiy-storchaka
      Member

      Because of its lucky number. See python/core-workflow#223 (fixed).

    27. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    easytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions