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 r096

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 lang vs sql

D s
snippetBasic

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: pi() as:'pi_col'

pi()


Output:
Returns 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 trans
RawWrangletrue
p03Value'pi'
Typestep
WrangleTextderive type:single value:pi() as:'pi'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valuepi()
p03NameNew column name
SearchTermNew formula

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