Skip to Main Content Skip to Search
Product Documentation

pi - Ratio of circle's circumference to its diameter

Syntax

pi

Description

pi returns the floating-point number nearest the value of π. The expressions 4*atan(1) and imag(log(-1)) provide the same value.

Examples

Find the sine of π:

sin(pi)

returns

ans =

   1.2246e-16

The expression sin(pi) is not exactly zero because pi is not exactly π.

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS