中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Python tan() 函數(shù)

Python 數(shù)字 Python 數(shù)字


描述

tan() 返回x弧度的正切值。


語法

以下是 tan() 方法的語法:

import math

math.tan(x)

注意:tan()是不能直接訪問的,需要導(dǎo)入 math 模塊,然后通過 math 靜態(tài)對象調(diào)用該方法。


參數(shù)

  • x -- 一個(gè)數(shù)值。

返回值

返回x弧度的正切值,數(shù)值在 -1 到 1 之間。


實(shí)例

以下展示了使用 tan() 方法的實(shí)例:

#!/usr/bin/python
import math

print "tan(3) : ",  math.tan(3)
print "tan(-3) : ",  math.tan(-3)
print "tan(0) : ",  math.tan(0)
print "tan(math.pi) : ",  math.tan(math.pi)
print "tan(math.pi/2) : ",  math.tan(math.pi/2)
print "tan(math.pi/4) : ",  math.tan(math.pi/4)

以上實(shí)例運(yùn)行后輸出結(jié)果為:

tan(3) :  -0.142546543074
tan(-3) :  0.142546543074
tan(0) :  0.0
tan(math.pi) :  -1.22460635382e-16
tan(math.pi/2) :  1.63317787284e+16
tan(math.pi/4) :  1.0

Python 數(shù)字 Python 數(shù)字

其他擴(kuò)展