ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](numbers.xhtml "numbers --- 数字的抽象基类") | - [上一页](enum.xhtml "enum --- Support for enumerations") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | # 数字和数学模块 本章介绍的模块提供与数字和数学相关的函数和数据类型。 [`numbers`](numbers.xhtml#module-numbers "numbers: Numeric abstract base classes (Complex, Real, Integral, etc.).") 模块定义了数字类型的抽象层次结构。 [`math`](math.xhtml#module-math "math: Mathematical functions (sin() etc.).") 和 [`cmath`](cmath.xhtml#module-cmath "cmath: Mathematical functions for complex numbers.") 模块包含浮点数和复数的各种数学函数。 [`decimal`](decimal.xhtml#module-decimal "decimal: Implementation of the General Decimal Arithmetic Specification.") 模块支持使用任意精度算术的十进制数的精确表示。 本章记录以下模块: - [`numbers` --- 数字的抽象基类](numbers.xhtml) - [The numeric tower](numbers.xhtml#the-numeric-tower) - [Notes for type implementors](numbers.xhtml#notes-for-type-implementors) - [Adding More Numeric ABCs](numbers.xhtml#adding-more-numeric-abcs) - [Implementing the arithmetic operations](numbers.xhtml#implementing-the-arithmetic-operations) - [`math` --- 数学函数](math.xhtml) - [数论与表示函数](math.xhtml#number-theoretic-and-representation-functions) - [幂函数与对数函数](math.xhtml#power-and-logarithmic-functions) - [三角函数](math.xhtml#trigonometric-functions) - [角度转换](math.xhtml#angular-conversion) - [双曲函数](math.xhtml#hyperbolic-functions) - [特殊函数](math.xhtml#special-functions) - [常数](math.xhtml#constants) - [`cmath` --- Mathematical functions for complex numbers](cmath.xhtml) - [Conversions to and from polar coordinates](cmath.xhtml#conversions-to-and-from-polar-coordinates) - [幂函数与对数函数](cmath.xhtml#power-and-logarithmic-functions) - [三角函数](cmath.xhtml#trigonometric-functions) - [双曲函数](cmath.xhtml#hyperbolic-functions) - [Classification functions](cmath.xhtml#classification-functions) - [常数](cmath.xhtml#constants) - [`decimal` --- 十进制定点和浮点运算](decimal.xhtml) - [快速入门教程](decimal.xhtml#quick-start-tutorial) - [Decimal 对象](decimal.xhtml#decimal-objects) - [Logical operands](decimal.xhtml#logical-operands) - [Context objects](decimal.xhtml#context-objects) - [常数](decimal.xhtml#constants) - [Rounding modes](decimal.xhtml#rounding-modes) - [Signals](decimal.xhtml#signals) - [Floating Point Notes](decimal.xhtml#floating-point-notes) - [Mitigating round-off error with increased precision](decimal.xhtml#mitigating-round-off-error-with-increased-precision) - [Special values](decimal.xhtml#special-values) - [Working with threads](decimal.xhtml#working-with-threads) - [Recipes](decimal.xhtml#recipes) - [Decimal FAQ](decimal.xhtml#decimal-faq) - [`fractions` --- 分数](fractions.xhtml) - [`random` --- 生成伪随机数](random.xhtml) - [簿记功能](random.xhtml#bookkeeping-functions) - [整数用函数](random.xhtml#functions-for-integers) - [序列用函数](random.xhtml#functions-for-sequences) - [实值分布](random.xhtml#real-valued-distributions) - [替代生成器](random.xhtml#alternative-generator) - [关于再现性的说明](random.xhtml#notes-on-reproducibility) - [例子和配方](random.xhtml#examples-and-recipes) - [`statistics` --- Mathematical statistics functions](statistics.xhtml) - [Averages and measures of central location](statistics.xhtml#averages-and-measures-of-central-location) - [Measures of spread](statistics.xhtml#measures-of-spread) - [Function details](statistics.xhtml#function-details) - [异常](statistics.xhtml#exceptions) ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](numbers.xhtml "numbers --- 数字的抽象基类") | - [上一页](enum.xhtml "enum --- Support for enumerations") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。