💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
该模块是python中的,不用安装就可直接使用,只需要import引入就行,例如 \>>> import math \>>> math.pi 3.141592653589793 math包含了以下功能 \>>> dir(math) \['\_\_doc\_\_', '\_\_loader\_\_', '\_\_name\_\_', '\_\_package\_\_', '\_\_spec\_\_', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'pi', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc'\] 列举几个常用的math模块中的函数 \>>> math.cos(45) 0.5253219888177297 \>>> math.pow(2,5) 32.0 使用help()函数,可以查看帮助 \>>> help(math.pow) Help on built-in function pow in module math: pow(x, y, /) Return x\*\*y (x to the power of y).