A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-October/122298.html below:

[Python-Dev] return type of __complex__

[Python-Dev] return type of __complex__ [Python-Dev] return type of __complex__Nick Coghlan ncoghlan at gmail.com
Sun Oct 21 12:35:24 CEST 2012
On Sun, Oct 21, 2012 at 8:11 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> I'm also not sure why we have several variants of the power operator:
> **, built-in pow(), math.pow().

Built-in pow() is provided for efficient modular arithmetic (via the
3-argument "pow(x, y, z)" form that means "x ** y % z")

I don't know the rationale math.pow() though - it may just stem from
the time when the math module was just a really thin wrapper around
the underlying C library's floating point math support.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

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