Python——built-in module Help: math
Help on built-in module math:
NAME
math
DESCRIPTION
This module is always available. It provides access to the
mathematical functions defined by the C standard.
FUNCTIONS
acos(...)
acos(x) Return the arc cosine (measured in radians) of x. acosh(...)
acosh(x) Return the inverse hyperbolic cosine of x. asin(...)
asin(x) Return the arc sine (measured in radians) of x. asinh(...)
asinh(x) Return the inverse hyperbolic sine of x. atan(...)
atan(x) Return the arc tangent (measured in radians) of x. atan2(...)
atan2(y, x) Return the arc tangent (measured in radians) of y/x.
Unlike atan(y/x), the signs of both x and y are considered. atanh(...)
atanh(x) Return the inverse hyperbolic tangent of x. ceil(...)
ceil(x) Return the ceiling of x as an Integral.
This is the smallest integer >= x. copysign(...)
copysign(x, y) Return a float with the magnitude (absolute value) of x but the sign
of y. On platforms that support signed zeros, copysign(1.0, -0.0)
returns -1.0. cos(...)
cos(x) Return the cosine of x (measured in radians). cosh(...)
cosh(x) Return the hyperbolic cosine of x. degrees(...)
degrees(x) Convert angle x from radians to degrees. erf(...)
erf(x) Error function at x. erfc(...)
erfc(x) Complementary error function at x. exp(...)
exp(x) Return e raised to the power of x. expm1(...)
expm1(x) Return exp(x)-1.
This function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x. fabs(...)
fabs(x) Return the absolute value of the float x. factorial(...)
factorial(x) -> Integral Find x!. Raise a ValueError if x is negative or non-integral. floor(...)
floor(x) Return the floor of x as an Integral.
This is the largest integer <= x. fmod(...)
fmod(x, y) Return fmod(x, y), according to platform C. x % y may differ. frexp(...)
frexp(x) Return the mantissa and exponent of x, as pair (m, e).
m is a float and e is an int, such that x = m * 2.**e.
If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0. fsum(...)
fsum(iterable) Return an accurate floating point sum of values in the iterable.
Assumes IEEE-754 floating point arithmetic. gamma(...)
gamma(x) Gamma function at x. gcd(...)
gcd(x, y) -> int
greatest common divisor of x and y hypot(...)
hypot(x, y) Return the Euclidean distance, sqrt(x*x + y*y). isclose(...)
isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) -> bool Determine whether two floating point numbers are close in value. rel_tol
maximum difference for being considered "close", relative to the
magnitude of the input values
abs_tol
maximum difference for being considered "close", regardless of the
magnitude of the input values Return True if a is close in value to b, and False otherwise. For the values to be considered close, the difference between them
must be smaller than at least one of the tolerances. -inf, inf and NaN behave similarly to the IEEE 754 Standard. That
is, NaN is not close to anything, even itself. inf and -inf are
only close to themselves. isfinite(...)
isfinite(x) -> bool Return True if x is neither an infinity nor a NaN, and False otherwise. isinf(...)
isinf(x) -> bool Return True if x is a positive or negative infinity, and False otherwise. isnan(...)
isnan(x) -> bool Return True if x is a NaN (not a number), and False otherwise. ldexp(...)
ldexp(x, i) Return x * (2**i). lgamma(...)
lgamma(x) Natural logarithm of absolute value of Gamma function at x. log(...)
log(x[, base]) Return the logarithm of x to the given base.
If the base not specified, returns the natural logarithm (base e) of x. log10(...)
log10(x) Return the base 10 logarithm of x. log1p(...)
log1p(x) Return the natural logarithm of 1+x (base e).
The result is computed in a way which is accurate for x near zero. log2(...)
log2(x) Return the base 2 logarithm of x. modf(...)
modf(x) Return the fractional and integer parts of x. Both results carry the sign
of x and are floats. pow(...)
pow(x, y) Return x**y (x to the power of y). radians(...)
radians(x) Convert angle x from degrees to radians. sin(...)
sin(x) Return the sine of x (measured in radians). sinh(...)
sinh(x) Return the hyperbolic sine of x. sqrt(...)
sqrt(x) Return the square root of x. tan(...)
tan(x) Return the tangent of x (measured in radians). tanh(...)
tanh(x) Return the hyperbolic tangent of x. trunc(...)
trunc(x:Real) -> Integral Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method.
DATA
e = 2.718281828459045
inf = inf
nan = nan
pi = 3.141592653589793
tau = 6.283185307179586
FILE
(built-in)
Python——built-in module Help: math的更多相关文章
- python - ImportError: No module named http.cookies error when installing cherrypy 3.2 - Stack Overflow
python - ImportError: No module named http.cookies error when installing cherrypy 3.2 - Stack Overfl ...
- Python ImportError: No module named 'requests'的解决方法
import requests报错 Python ImportError: No module named 'requests'可能是requests没有安装 安装流程 1.cmd 2.cd D:\p ...
- 关于python中的module
python中的module(模块),关于这个概念以及使用时主要有以下几点需要注意: (1)import xx时,会首先将这个xx module中的代码执行一遍(且仅执行一遍): 例如: (2)模块包 ...
- fatal: [db01]: FAILED! => {"changed": false, "msg": "The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required."}
centos7.5 使用ansible中的role安装mariadb创建用户报错 错误: [root@m01 roles]# ansible-playbook site.yml TASK [mysql ...
- Python ImportError: No module named Image
/********************************************************************************* * Python ImportEr ...
- python 3 serial module install
/************************************************************************* * python 3 serial module ...
- 转载:关于 python ImportError: No module named 的问题
关于 python ImportError: No module named 的问题 今天在 centos 下安装 python setup.py install 时报错:ImportError: N ...
- Python报错module 'scipy.misc' has no attribute 'xxx'
Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...
- Python- 【python无法更新pip】提示python.exe: No module named pip
用Anaconda安装的python 版本无法更新pip导致不能安装第三方库: 用Anaconda Prompt安装第三方库: python -m pip install --upgrade pip ...
随机推荐
- SQL 知道字段名 全表搜索此字段属于哪个表
SELECT name FROM sysobjects WHERE id IN (SELECT ID FROM syscolumns WHERE name='字段名')
- python之控制流
https://www.cnblogs.com/evablogs/p/6691776.html 条件判断 简单if语句 1 2 3 4 5 >>>name='lily' >&g ...
- UI对象库-定位元素与程序分离
1.前言 这几天有人问我,UI自动化测试中使用到的页面定位元素应该存放在哪里比较合适?我想说的是如果你使用的是PO设计模式设计测试用例的话,可以把定位元素存在每一个page页面,一个page存放对应的 ...
- Web前端教程3-JavaScript教程
目录 1. JavaScript介绍 1.1. JS嵌入页面的方式 2. JS基本语法 2.1. 变量类型 2.2. 获取元素方法 2.3. 操作元素属性 2.4. innerHTML的使用 3. J ...
- windows下mysql 5.7以上版本安装及遇到的问题
(原) 早些前用window安装mysql挺简单的,一个安装程序,一路下一步. 2006的5.0版本,确实太早了点. 于是官网上又下了一个版本,windows也是提供了二个版本Installer(安装 ...
- 写一函数,用来求表达式1+2+3+.....+n的值,并编写主函数
Description 写一函数,用来求表达式1+2+3+.....+n的值,并编写主函数.n由键盘输入. Input 输入一个整数 Output 输出表达式的值 Sample Input 5 Sam ...
- react dnd demo2
import React, { Component } from 'react'; import './App.css'; import Card from './Card'; import HTML ...
- 012_python在shell下单行执行多行代码
一.有时候只是简单的获取下时间戳,不想在python解释器的交互模式下再去执行python代码,如何实现呢? 以循环输出多行为例: (1)第一种方式: python -c "exec(\&q ...
- c++ 重点随记
1.在公有继承中:(1).派生类对象储存了基类的私有成员 (2).派生类对象可以使用基类的方法 (3).基类引用可以引用派生类对象,派生类引用不可以引用基类对象 2.基类引用引用派生类对象时:若基类引 ...
- OpenStack之Fuel架构及其工作原理
一.Fuel架构 Fuel是一个开源的OpenStack部署和管理的工具,它允许用户通过Web UI进行OpenStack的部署和管理,并可以通过插件来扩展. Fuel的目标:加快和简化不同配置的 ...