Movatterモバイル変換


[0]ホーム

URL:


Following system colour schemeSelected dark colour schemeSelected light colour scheme

Python Enhancement Proposals

PEP 628 – Addmath.tau

Author:
Alyssa Coghlan <ncoghlan at gmail.com>
Status:
Final
Type:
Standards Track
Created:
28-Jun-2011
Python-Version:
3.6
Post-History:
28-Jun-2011

Table of Contents

Abstract

In honour of Tau Day 2011, this PEP proposes the addition of the circleconstantmath.tau to the Python standard library.

The concept oftau (τ) is based on the observation that the ratio of acircle’s circumference to its radius is far more fundamental and interestingthan the ratio between its circumference and diameter. It is simply a matterof assigning a name to the value2*pi ().

PEP Acceptance

This PEP is nowaccepted andmath.tau will be a part of Python 3.6.Happy birthday Alyssa!

The idea in this PEP has been implemented in the auspiciously namedissue 12345.

The Rationale for Tau

pi is defined as the ratio of a circle’s circumference to its diameter.However, a circle is defined by its centre point and itsradius. This isshown clearly when we note that the parameter of integration to go from acircle’s circumference to its area is the radius, not the diameter. If weuse the diameter instead we have to divide by four to get rid of theextraneous multiplier.

When working with radians, it is trivial to convert any given fraction of acircle to a value in radians in terms oftau. A quarter circle istau/4, a half circle istau/2, seven 25ths is7*tau/25, etc. Incontrast with the equivalent expressions in terms ofpi (pi/2,pi,14*pi/25), the unnecessary and needlessly confusing multiplication bytwo is gone.

Other Resources

I’ve barely skimmed the surface of the many examples put forward to point outjust how mucheasier and moresensible many aspects of mathematics becomewhen conceived in terms oftau rather thanpi. If you don’t find myspecific examples sufficiently persuasive, here are some more resources thatmay be of interest:

Copyright

This document has been placed in the public domain.


Source:https://github.com/python/peps/blob/main/peps/pep-0628.rst

Last modified:2025-07-14 10:51:16 GMT


[8]ページ先頭

©2009-2025 Movatter.jp