# Why are there individual keywords for different multiples of π

**URL:** <https://discourse.processing.org/t/why-are-there-individual-keywords-for-different-multiples-of/48519>\
**Category:** Beginners\
**Created:** [May 8, 2026, 1:21pm UTC](https://discourse.processing.org/t/why-are-there-individual-keywords-for-different-multiples-of/48519 "2026-05-08T13:21:00Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [May 9, 2026, 2:00pm UTC](https://discourse.processing.org/t/why-are-there-individual-keywords-for-different-multiples-of/48519/7 "2026-05-09T14:00:40Z")

</div>

I was curious:

```auto
// The Processing constants are evaluated as doubles and then cast to floats.
// I am comparing the constants to the mathematical expression on the right for binary equality.

// float PI = (float) Math.PI;
println(PI == PI); // :)

// float HALF_PI = (float) (Math.PI / 2.0);
println(HALF_PI == PI / 2);

// float THIRD_PI = (float)(Math.PI / 3.0);
println(THIRD_PI == PI / 3);

// float QUARTER_PI = (float)(Math.PI / 4.0);
println(QUARTER_PI == PI / 4);

// float TWO_PI = (float) (2.0 * Math.PI);
println(TWO_PI == 2 * PI);

// float TAU = (float) (2.0 * Math.PI);
println(TAU == 2 * PI);

```

They were all `true`!

Processing generally works with `float` values for its sketch-level math.

In some cases, I have used `double` for higher precision during the intermediate calculation, then cast the final result to `float`.

Further exploration:  
_[Processing float values: decimal output and IEEE 754 bit patterns](https://discourse.processing.org/t/processing-float-values-decimal-output-and-ieee-754-bit-patterns/48526)_

`:)`

---

_[View the full topic](https://discourse.processing.org/t/why-are-there-individual-keywords-for-different-multiples-of/48519)._
