pi 函数

来源:互联网 发布:linux安装samba服务器 编辑:程序博客网 时间:2024/04/27 21:24

pi 函数

Ratio of a 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.

pi返回最接近的数值的浮点数值。语句4*atan(1)imag(log(-1))提供了相同的数值。

Examples

例如:

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

语句sin(pi)不是确切的零,因为pi不是确切的

sin(pi)

ans =

   1.2246e-16

原创粉丝点击