Python math.gamma() 方法
例如:
求不同数的函数:
# Import math Library
import math
# 为不同的数字返回gamma函数
print(math.gamma(-0.1))
print(math.gamma(8))
print(math.gamma(1.2))
print(math.gamma(80))
print(math.gamma(-0.55))1、定义和用法
math.gamma()方法以数字形式返回gamma函数。
提示:要查找数字的对数伽马值,请使用math.lgamma()方法。
2、调用语法
math.gamma(x)3、参数说明
参数  | 描述  | 
x  | 必需的参数, 查找伽玛函数的数字。 如果数字是负整数, 则返回ValueError。 如果不是数字,则返回TypeError。  | 
4、方法说明
返回值:  | 
  | 
Python Version:  | 3.2  |