# Un angle n'est connu qu'à 2π près, et les flottants ne se comparent pas avec ==
import cmath

z = cmath.exp(4j)  # construit avec l'angle 4 rad
print("angle relu :", round(cmath.phase(z), 3))
print("4 - 2π =", round(4 - 2 * cmath.pi, 3))

full_turn = cmath.exp(2j * cmath.pi)  # un tour complet
print("écart entre e^(2iπ) et 1 :", format(abs(full_turn - 1), ".1e"))
print("e^(2iπ) == 1 :", full_turn == 1)
print("cmath.isclose(e^(2iπ), 1) :", cmath.isclose(full_turn, 1))
