def pgcd(a,b): while b: a, b = b, a%b return a def trigo2() : t = 1 num = int(input("Numérateur : ")) den = int(input("Dénominateur : ")) a = num if a < 0 : a = -a if a < den : print("C'est la valeur Principale") else : for i in range(a) : if i%(den*2) == 0 : t = i if num < 0 : t = -t x = num - t u = t / (den* 2) if den < x < (2*den) and x > 0 : x = x - (2*den) if u <0 : u -= 1 else : u += 1 elif -den > x > -(2*den) and x < 0 : x = x + (2*den) if u <0 : u -= 1 else : u += 1 if den%x == 0 : den = den/x x = 1 if x%den == 0 : x = x/den den = 1 if pgcd(x,den) != 1 : h = pgcd(x,den) x = x/h den = den/h if x > 0 : if den == 1 : print(str(u)+"*2π + "+str(x)+"π") else : print(str(u)+"*2π + "+str(x)+"π/"+str(den)) else : if den == 1 : print(str(u)+"*2π - "+str(-x)+"π") else : print(str(u)+"*2π - "+str(-x)+"π/"+str(den))