当前位置:网站首页>Python math class

Python math class

2020-11-10 10:46:17 osc_nzvfn3cl

import math
# radian 、 Angle conversion
print(math.degrees(math.pi))
print(math.radians(180))
# Trigonometric functions ( sine 、 Anti sine 、 cosine )
print(math.sin(math.pi/3))
print(math.cos(math.pi/2-math.pi/3))
print(math.tan(math.pi/4))
# Anti sine 、 Arccosine 、 Anyway
print(math.asin(math.sin(math.pi/3)))
print(math.acos(math.cos(math.pi/2-math.pi/3)))
print(math.atan(math.tan(math.pi/4)))
print(math.atan2(4,2))
# return x The hyperbolic tangent of \ Hyperbolic sine \ Hyperbolic cosine value
print(math.tanh(3))
print(math.cosh(3))
print(math.sinh(3))
# return x The inverse hyperbolic tangent of \ Anti bisinusoidal function 、 Anti double cosine function
print(math.atanh(0.3))
print(math.asinh(math.pi/3))
print(math.acosh(math.pi/3))
# Up 、 Rounding down , Take the absolute value , Copy the sign of the last number to the first number , Take the remainder of the division of two numbers , Take the greatest common divisor
print(math.ceil(5.3))
print(math.floor(5.3))
print(math.fabs(-3.34))
print(math.copysign(3,-4))
print(math.fmod(9,7))
# return IEEE 754 Style x be relative to y The remainder of
print(math.remainder(9,7))
print(math.gcd(9,6))
# Back in Europe





























版权声明
本文为[osc_nzvfn3cl]所创,转载请带上原文链接,感谢