Excerpt |
---|
The PI function generates the value of pi to 15 decimal places: 3.1415926535897932. |
This function uses no parameters. Generated values are of Decimal type and have fifteen digits of precision after the decimal point. If you want to see a fewer number of digits in the generated value, you might need to apply a different number format or using the ROUND function.
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: pi() as:'pi_col' |
---|
|
pi() |
Output: Returns the value of pi.
There are no arguments for this function.
Example - pi column
In the following example, the source is simply the source
column, and the pi
column is generated by the PI
function:
D trans |
---|
RawWrangle | true |
---|
p03Value | 'pi' |
---|
Type | step |
---|
WrangleText | derive type:single value:pi() as:'pi' |
---|
p01Name | Formula type |
---|
p01Value | Single row formula |
---|
p02Name | Formula |
---|
p02Value | pi() |
---|
p03Name | New column name |
---|
SearchTerm | New formula |
---|
|
source | pi |
---|
A | 3.1415926535897932 |
B | 3.1415926535897932 |
C | 3.1415926535897932 |
D | 3.1415926535897932 |
Example - RANDBETWEEN, PI, and TRUNC functions
Include Page |
---|
| EXAMPLE - RANDBETWEEN and PI Functions |
---|
| EXAMPLE - RANDBETWEEN and PI Functions |
---|
|