PI scalar function

The PI scalar function returns the value of π, 3.141592653589793. There are no arguments.

Read syntax diagramSkip visual syntax diagramPI( )

The schema is SYSIBM.

The result of the function is a double-precision floating-point value.

The result cannot be null.

If a DECFLOAT version of PI is needed for greater precision, use the following expression:
RADIANS(DECFLOAT(180))

Example

The following example shows the command syntax for using the PI function to return the circumference of a circle with a diameter of 10:
SELECT PI()*10
    FROM SYSIBM.SYSDUMMY1