python库-math.docxVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
python库-math

import math dir(math)Out[2]: [__doc__, __name__, __package__, acos,---反余弦 acosh,---反双曲余弦 asin,---反正弦 asinh,---反双曲正弦 atan,---反正切 atan2,---math.atan(y,x),y/x的反正切 atanh,---反双曲正切 ceil,---返回=x的最小整数,反floor copysign,---math.copysign(x,y),返回与y同号的x值(改变x值符号) cos,---余弦 cosh,---反余弦 degrees,---将弧长转化为角度,反radians e,---2。7128 erf,---误差函数 erfc,---1-erf exp,---e的x次方 expm1,---e的x次方-1 fabs,---绝对值 factorial,---x阶乘 floor,---返回=x的最大整数,反ceil fmod,--- 返回 x对y取模的余数,以x来决定余数的符号,%以y来决定余数的符号 frexp,---反ldexp,frexp(x),返回m,n fsum,---返回x阵列各项和,例math.frexp([2,5]) gamma,---伽马函数 hypot,---hypot(x,y)平方和开根号 isinf,---是否为正负无穷大,是则true isnan,---x = NaN,true,x为0也返回false ldexp,---ldexp(x,y),输出m*2的n次方,反frexp lgamma,---伽马函数的自然对数 log,---log(x,a),a不写则为e log10,---log10(x) log1p,--- 返回? modf,--- 返回 x 的小数部份与整数部份,似trunc pi,---π pow,--- 返回 xy radians,--- 將 x(角度) 转成弧长,与 degrees 为反函数 sin,---正弦 sinh,---反正弦 sqrt,---开根号 tan,---正切 tanh,---反正切 trunc]--- 返回 x 的整数部份,等同 int,似modf两个常量pi,e举例:math.fmod(5,3)Out[12]: 2.0In [14]: math.fmod(-5,3)Out[14]: -2.0In [15]: math.fmod(5,-3)Out[15]: 2.0In [16]: math.fmod(-5,-3)Out[16]: -2.05%3Out[17]: 25%(-3)Out[19]: -1-5%3Out[20]: 1-5%(-3)Out[21]: -2官方文档:9.2. math — Mathematical functionsThis module is always available. It provides access to the mathematical functions defined by the C standard.These functions cannot be used with complex numbers; use the functions of the same name from the cmath module if you require support for complex numbers. The distinction between functions which support complex numbers and those which don’t is made since most users do not want to learn quite as much mathematics as required to understand complex numbers. Receiving an exception instead of a complex result allows earlier detection of the unexpected complex number used as a parameter, so that the programmer can determine how and why it was generated in the first place.The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.9.2.1. Number-theoretic

文档评论(0)

xcs88858 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档