Using the math module's functions and constants

Python's math module is built in; therefore, it is always available for import. The mathematical functions contained within it are defined by the C standard, so if something doesn't work, blame the C developers.

Complex numbers are handled by a separate module (cmath), so the math module can only be used with integers and floating point numbers. This was done on purpose, as dealing with complex numbers requires more effort than most people need for general functions. Unless otherwise indicated, all math arguments can be integers or floats.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset