# Pi

Returns the mathmatical constant Pi accurate to 15 digits

## Method Signature

```
Pi()
```

### Arguments

This function does not accept any arguments

## Examples

### pi to 11 digits

[Run Example](https://try.boxlang.io/?code=eJwryNTQtOYCAAZOAXA%3D)

```java
pi();

```

Result: 3.141592653589793238462643383279503

### Display all 15 digits with numberFormat

[Run Example](https://try.boxlang.io/?code=eJzLK81NSi1yyy%2FKTSzRUCjI1NDUUVAy0DNABUoKmtZcABvgCrE%3D)

```java
numberFormat( pi(), "0.000000000000000" );

```

Result: 3.141592653589793

### Boxlang only shows up to 15 digits of pi

After 15th digit CF outputs 0's

[Run Example](https://try.boxlang.io/?code=eJzLK81NSi1yyy%2FKTSzRUCjI1NDUUVAy0DPABEoKmtZcAEmEC3E%3D)

```java
numberFormat( pi(), "0.0000000000000000000" );

```

Result: 3.1415926535897932385

### Additional Examples

```java
<bx:output>#pi()#</bx:output>
```

## Related

* [Abs](/boxlang-language/reference/built-in-functions/math/abs.md)
* [Acos](/boxlang-language/reference/built-in-functions/math/acos.md)
* [Asin](/boxlang-language/reference/built-in-functions/math/asin.md)
* [Atn](/boxlang-language/reference/built-in-functions/math/atn.md)
* [Ceiling](/boxlang-language/reference/built-in-functions/math/ceiling.md)
* [Cos](/boxlang-language/reference/built-in-functions/math/cos.md)
* [DecrementValue](/boxlang-language/reference/built-in-functions/math/decrementvalue.md)
* [Exp](/boxlang-language/reference/built-in-functions/math/exp.md)
* [Fix](/boxlang-language/reference/built-in-functions/math/fix.md)
* [Floor](/boxlang-language/reference/built-in-functions/math/floor.md)
* [FormatBaseN](/boxlang-language/reference/built-in-functions/math/formatbasen.md)
* [IncrementValue](/boxlang-language/reference/built-in-functions/math/incrementvalue.md)
* [InputBaseN](/boxlang-language/reference/built-in-functions/math/inputbasen.md)
* [Int](/boxlang-language/reference/built-in-functions/math/int.md)
* [Log](/boxlang-language/reference/built-in-functions/math/log.md)
* [Log10](/boxlang-language/reference/built-in-functions/math/log10.md)
* [Max](/boxlang-language/reference/built-in-functions/math/max.md)
* [Min](/boxlang-language/reference/built-in-functions/math/min.md)
* [PrecisionEvaluate](/boxlang-language/reference/built-in-functions/math/precisionevaluate.md)
* [Rand](/boxlang-language/reference/built-in-functions/math/rand.md)
* [Randomize](/boxlang-language/reference/built-in-functions/math/randomize.md)
* [RandRange](/boxlang-language/reference/built-in-functions/math/randrange.md)
* [Round](/boxlang-language/reference/built-in-functions/math/round.md)
* [Sgn](/boxlang-language/reference/built-in-functions/math/sgn.md)
* [Sin](/boxlang-language/reference/built-in-functions/math/sin.md)
* [Sqr](/boxlang-language/reference/built-in-functions/math/sqr.md)
* [Tan](/boxlang-language/reference/built-in-functions/math/tan.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/pi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
