3 ms·
Any idea why they appear to prefer `cmath.pi` and `cmath.e` rather than `math.pi` and `math.e`?
by kibwen 14y ago
Any idea why they appear to prefer `cmath.pi` and `cmath.e` rather than `math.pi` and `math.e`?
- deleted 14y ago[deleted]
- rom16384 14y agoWhile that convention is generally true, in this case the c in cmath refers to complex numbers.
- kibwen 14y agorom is correct, both the math and cmath modules are implemented in C. And even if the math module was pure Python I don't think that the speed of accessing a constant would be drastically different.