File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -94,23 +94,23 @@ to_symb(t::QQFieldElem) = to_symb(Rational(t))
9494
9595function to_symb (t:: QQBarFieldElem )
9696 if degree (t)== 1
97- return to_symb (QQ (t))
97+ return to_symb (Rational {BigInt} (t))
9898 end
9999 kx, _ = polynomial_ring (Nemo. QQ, :x )
100100 f = minpoly (kx, t)
101101 if degree (f)== 2 && iszero (coeff (f,1 ))
102102 y = to_symb (- coeff (f,0 )// coeff (f, 2 ))
103103 if y>= 0
104104 if t== maximum (conjugates (t))
105- return SymbolicUtils . Term ( sqrt, y)
105+ return sqrt ( y)
106106 else
107- return - SymbolicUtils . Term ( sqrt, y)
107+ return - sqrt ( y)
108108 end
109109 else
110110 if imag (t)== maximum (imag .(conjugates (t)))
111- return SymbolicUtils . Term ( sqrt, - y)* 1im
111+ return sqrt ( - y)* 1im
112112 else
113- return - SymbolicUtils . Term ( sqrt, - y)* 1im
113+ return - sqrt ( - y)* 1im
114114 end
115115 end
116116 elseif degree (f)== 2 # coeff(f,1)!=0
Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ using SymbolicUtils
6161
6262 # Test case 8: (-1+x+x^3)/(1+x^2)^2
6363 # Expected: -1/2*x/(1+x^2)-1/2*atan(x)+1/2*log(1+x^2)
64- # BROKEN : Complex root conversion API issue
64+ # FIXED : Complex root handling now works!
6565 f8 = (- 1 + x+ x^ 3 )// (1 + x^ 2 )^ 2
66- @test_broken integrate (f8, x) isa Any
66+ result8 = integrate (f8, x)
67+ @test ! isnothing (result8)
6768 end
6869
6970 @testset " Advanced Rational Functions" begin
You canβt perform that action at this time.
0 commit comments