Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

D toc
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 s
snippetBasic

D code

derive type:single value: PI() as:'pi_col'

Output: For each row, generate the value of pi.

D s
snippetSyntax

There are no arguments for this function.

D s
snippetExamples

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 code

derive type:single value:PI() as:'pi'

sourcepi
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

D s also
labelother