| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
pi
pi returns the floating-point number nearest the value of π. The expressions 4*atan(1) and imag(log(-1)) provide the same value.
Find the sine of π:
sin(pi)
returns
ans = 1.2246e-16
The expression sin(pi) is not exactly zero because pi is not exactly π.
![]() | persistent | pie | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |