Skip to content

pi

Description

Returns the mathematical constant π (pi), limited to 15 decimal places.

Syntax

pi(): number

Example

Use case: Compute the area of a circle

Use π with the formula π × r² to calculate the area of a circle given a radius in meters.

{
    "distance_m": 10
}
create area from (pi() * power(distance_m, 2))

Output

{
    "distance_m": 10,
    "area": 314.1592653589793
}