table the math module' functions and constants # syntax description math pi the constant papproximately math pow(xyreturns xy as float math radians(dconverts float from degrees to radians math sin(xreturns the sine of in radians math sinh(xreturns the hyperbolic sine of in radians math sqrt(xreturns math tan(xreturns the tangent of in radians math tanh(xreturns the hyperbolic tangent of in radians math trunc(xreturns the whole part of as an intsame as int(xdef equal_float(ab)return abs( <sys float_info epsilon this requires us to import the sys module the sys float_info object has many attributessys float_info epsilon is effectively the smallest difference that the machine can distinguish between two floating-point numbers on one of the author' -bit machines it is just over (epsilon is the traditional name for this number python floats normally provide reliable accuracy for up to significant digits if you type sys float_info into idleall its attributes will be displayedthese include the minimum and maximum floating-point numbers the machine can represent and typing help(sys float_infowill print some information about the sys float_info object floating-point numbers can be converted to integers using the int(function which returns the whole part and throws away the fractional partor using round(which accounts for the fractional partor using math floor(or math ceil(which convert down to or up to the nearest integer the float is_integer(method returns true if floating-point number' fractional part is and float' fractional representation can be obtained using the float as_integer_ratio(method for examplegiven the call as_integer_ratio(returns ( integers can be converted to floatingpoint numbers using float(floating-point numbers can also be represented as strings in hexadecimal format using the float hex(method such strings can be converted back to floating-point numbers using the float fromhex(method for examples hex(str =' +