The math module in Python provides many common mathematical functions. Some of the key functions include:
1. ceil, floor, and copysign for number-theoretic operations on integers and floats.
2. Hyperbolic functions like acosh, asinh, and atanh for inverse hyperbolic trigonometric functions.
3. Special functions like erf for error functions and erfc for complementary error functions.
4. Angular conversion between radians and degrees with radians and degrees.
5. Trigonometric functions like acos, asin, and constants like pi and e.
6. Logarithmic functions including log1p, log2, and log10.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
35 views2 pages
Java Pracs
The math module in Python provides many common mathematical functions. Some of the key functions include:
1. ceil, floor, and copysign for number-theoretic operations on integers and floats.
2. Hyperbolic functions like acosh, asinh, and atanh for inverse hyperbolic trigonometric functions.
3. Special functions like erf for error functions and erfc for complementary error functions.
4. Angular conversion between radians and degrees with radians and degrees.
5. Trigonometric functions like acos, asin, and constants like pi and e.
6. Logarithmic functions including log1p, log2, and log10.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Q2)Explain any 5 math functions in python in detail?
The math module is a standard module in python and is
always available .To use mathematical functions under this module you have to import the module using import math and call the functions as math.functions_name(Parameter) . Eg. import math Print math.cell(20.3) >>>math.cell(20.3) 21.0 >>> These functions cannot be used with complex numbers.the following functions are provided by this module: **NUMBER-THEORETIC AND REPRESENTATION FUNCTIONS 1)math.ceil(x)-It returns the smallest integer greater than x. 2)math.copysign(x,y)-It returns x with the sign of y 3)math.floor(x)-It returns the floor of x as a float,the largest integer value less than or equal to x **HYPERBOLIC FUNCTIONS 1)math.acosh(x)-It returns the inverse hyperbolic cosine of x. 2)math.asinh(x)-It returns the inverse hyperbolic sine of x. 3)math.atanh(x)-It returns the inverse hyperbolic tan of x. **SPECIAL FUNCTIONS 1)math.erf(x)-It return the error function of x. 2)math.erfc(x)-It return the complementary error function at x **ANGULAR CONVERSION 1)math.degrees(x)-Convert angle x from radians to degrees 2)math.radians(x)-Convert angle x from degrees to radians **TRIGONOMETRIC FUNCTIONS 1)math.acos(x)-Return the arc cosine of x ,in radians 2)math.asin(x)-Return the arc sine of x ,in radians **CONSTANTS 1)pi-Represents a Mathematical constant, the ratio of circumference of a circle to it diameter(3.14159…) 2)E-Standard Mathematical constant e (2.71828…) **LOGARITHMIC FUNCTIONS 1)log1p(x)- It returns the natural logarithm of 1+x 2)log 2(x)-It returns the base-2 logarithm of x 3)log10(x)-It returns the base-10 logarithm of x.