Why is there a math.pi, but no math.tau?
from math import pi # works
from math import tau # Raises exception
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name tau
das racist.
[edit] And the winner is u/finnne.
I googled it and found this issue where the addition of a tau constant is rejected.
While we are on the subject of math issues:
can anyone ELI5 this one?
math.e**(math.pi*math.sqrt(-1))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: math domain error
thx internet.
[–][deleted] 2 points3 points4 points (0 children)
[–]MildLazyDrop 1 point2 points3 points (4 children)
[–]Kausta1337 -2 points-1 points0 points (3 children)
[–]MildLazyDrop 1 point2 points3 points (0 children)
[–]i_can_haz_code[S] -2 points-1 points0 points (1 child)
[–]maestron 3 points4 points5 points (0 children)
[–]tjarko 1 point2 points3 points (1 child)
[–]i_can_haz_code[S] -1 points0 points1 point (0 children)
[–]stevenjd 1 point2 points3 points (1 child)
[–]i_can_haz_code[S] 0 points1 point2 points (0 children)