Are We τ Yet?

Your favorite programming language might be failing you!

τ (tau) in mathematics is a constant equal to the ratio of a circle's circumferance to its radius.

You may be more familiar with its little brother: π (pi), equal to the ratio of a circle's circumferance to its diameter.

So you may be asking yourself then. Isn't τ just 2π?

Well.. yes.

But that is more usefull than you think! And yet, many languages have not yet included it in their standard libraries!


When to use τ

So when would one use τ?

Well everywhere one would use 2π!

Take the following code sample:

double calculate_circumference(double radius) 
{
    return 2 * PI * radius; // my fingers hurt :(
}

Aren't your fingers hurting from just looking at the amount of multiply symbols in there? Thats two seperate buttons! For one character!

Now take a look at this:

double calculate_circumference(double radius) 
{
    return TAU * radius; // I feel refreshed :D
}

Isn't that just more pleasing to the eyes? :3

Okay but now a more usefull example. Say you want to convert degrees into radians. Most sources would tell you to do the following:

double degrees_to_radians(double degrees) 
{
    return degrees * PI / 180; // 180???? 
}

Now when you first come across this you might rightfully have some questions. What the hell is 180? Where did that come from?

This is when you are told: "why it's 360 12 of course! 360 being the degrees of a full rotation! We half it because π is equal to the ratio of a circle's circumferance to its diameter!"

But now observe: The humble τ.

double degrees_to_radians(double degrees) 
{
    return degrees * TAU / 360; // Oh 360! As in a full rotation!
}

Doesn't that just make more inherent sense?!

If you want more convincing examples from people who know what they are talking about, feel free to read the Tau Manifesto: https://www.tauday.com/tau-manifesto


So where can I find τ?

Sadly, not every programming language is kind enough to offer such conviniences. If you are an unfortunate soul stuck with with one of those languages this can easily be fixed by adding it as a constant yourself like so:

#define TAU 6.28318530717958647692528676655900577

Would you rather use a language that provides this by itself? Fret not! Below I have written a comprehensive list of which languages do and do not provide this lovely constant!


So which languages are τ already? This website is only a half-serious attempt to mainstream TAU in programming please do not harass anyone involved in the development of these languages! These people have hard jobs already and we owe them a lot for the amazing work they do! If you have any updates regarding this, or if you notice wrong information, feel free to contact me at: contact@getagripgal.nl
Ada

Ada does not have a τ constant and I could not find any proposals to add it..

C

C does not have a τ constant. It does have a π constant, M_PI in math.h — but no M_TAU.

Update (9-9-2026): Originally this entry was marked "PASS" on the reasoning that C lacks a π constant too, so it couldn't be blamed for lacking τ. However Reddit user u/verdant-amiable pointed out to me that M_PI does in fact exist, which means it has no excuse! >:( Status updated to "NO".

C++

C++ does not have a τ constant. There is a perposal to add one to std::numbers from 2022.

https://lists.isocpp.org/std-proposals/2022/03/3642.php
Clojure

Clojure does not have a τ constant and I could not find any proposals to add it..

D

D does not have a τ constant and I could not find any proposals to add it.

Dart

Dart does not have a τ constant and I could not find any proposals to add it.

Go

Go does not have a τ constant. There was a proposal to add it in 2020, but it was rejected.

https://github.com/golang/go/issues/40663
Javascript

Javascript does not have a τ constant. There was a proposal on esdiscuss.org, and apperently it was brought up in a TC39 meeting. In the end they decided against adding it because it was not well-known enough.

https://esdiscuss.org/topic/math-tau
Julia

Whilst not in the base language, it exists in the JuliaMath package Tau.jl. Which also provides Tau veriants of sin, cos, sincos, cispi and mod2pi.

https://github.com/JuliaMath/Tau.jl
Kotlin

Kotlin does not have a τ constant. Whilst is was briefly discussed in the kotlin forums as an addition to kotlin.math, it was never made an official proposal.

https://discuss.kotlinlang.org/t/adding-kotlin-math-tau/17967/8
Lua

Lua does not have a τ constant and I could not find any proposals to add it.

MATLAB

MATLAB does not have a τ constant and I could not find any proposals to add it.

OCaml

OCaml does not have a τ constant and I could not find any proposals to add it.

Perl

Perl does not have a τ constant and I could not find any proposals to add it.

PHP

PHP does not have a τ constant and I could not find any proposals to add it.

Processing

Processing has TAU as an alias of TWO_PI.

https://processing.org/reference/TAU.html
R

R does not have a τ constant and I could not find any proposals to add it. It does have Kendall's Tau which is also named tau(), which caused some confusion.

Raku

Raku supports both the ASCII tau term and the literal τ symbol itself as built-in terms.

https://docs.raku.org/language/terms
Ruby

Ruby does not have a τ constant. A perposal was made 10 years ago but was rejected, with the stated intention to add it "after (and only after) it became time-proven major,".

https://bugs.ruby-lang.org/issues/4897
Scala

Scala does not have a τ constant and I could not find any proposals to add it. This is an odd case, since it usually forwards all the symbols that Java has, and Java has had τ since Java 19.

Swift

Swift does not have a τ constant. Whilst is was briefly discussed in the as an issue in github, it was rejected as an addition to the language. Maintainer stephentyrone had this to say: "τ is an entertaining novelty. It is not meaningfully better or more correct than π. Why not provide both so that users can choose? Because then everyone who reads τ has to scratch their head for a minute and go down a rabbit hole of YouTube videos. If you want to use it in your own code, it is trivial to define"

https://github.com/apple/swift-numerics/issues/89

If you have reached the end I thank you for reading my ramblings. You can find more of me personally on getagripgal.nl. Feel free to stop by :P

I hope this website was either usefull to you or gave you a good chuckle!