A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/module_cmath.asp below:

Website Navigation


Python cmath Module

Python cmath Module Python cmath Module

Python has a built-in module that you can use for mathematical tasks for complex numbers.

The methods in this module accepts int, float, and complex numbers. It even accepts Python objects that has a __complex__() or __float__() method.

The methods in this module almost always return a complex number. If the return value can be expressed as a real number, the return value has an imaginary part of 0.

The cmath module has a set of methods and constants.

cMath Methods
cMath Constants Constant Description cmath.e Returns Euler's number (2.7182...) cmath.inf Returns a floating-point positive infinity value cmath.infj Returns a complex infinity value cmath.nan Returns floating-point NaN (Not a Number) value cmath.nanj Returns coplext NaN (Not a Number) value cmath.pi Returns PI (3.1415...) cmath.tau Returns tau (6.2831...)

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4