@@ -1392,7 +1392,7 @@ end
13921392 @test sprint (show, p) == " $P (1.0 + 2.0*x + 3.0*x^2)"
13931393
13941394 p = P ([1 + 1im , - 2im ])
1395- @test sprint (show, p) == " $P (1 + im - 2im*x)"
1395+ @test sprint (show, p) == " $P (( 1 + im) - 2im*x)"
13961396
13971397
13981398 p = P ([1 ,2 ,3 ,1 ]) # leading coefficient of 1
@@ -1402,7 +1402,7 @@ end
14021402 p = P ([1 , im])
14031403 @test repr (p) == " $P (1 + im*x)"
14041404 p = P ([1 + im, 1 - im, - 1 + im, - 1 - im])# minus signs
1405- @test repr (p) == " $P (1 + im + (1 - im)x - (1 - im)x^2 - (1 + im)x^3)"
1405+ @test repr (p) == " $P (( 1 + im) + (1 - im)x - (1 - im)x^2 - (1 + im)x^3)"
14061406 p = P ([1.0 , 0 + NaN * im, NaN , Inf , 0 - Inf * im]) # handle NaN or Inf appropriately
14071407 @test repr (p) == " $P (1.0 + NaN*im*x + NaN*x^2 + Inf*x^3 - Inf*im*x^4)"
14081408
@@ -1412,13 +1412,13 @@ end
14121412 p = P ([1 // 2 , 2 // 3 , 1 ])
14131413 @test repr (" text/latex" , p) == " \$\\ frac{1}{2} + \\ frac{2}{3}\\ cdot x + x^{2}\$ "
14141414 p = P ([complex (1 ,1 ),complex (0 ,1 ),complex (1 ,0 ),complex (1 ,1 )])
1415- @test repr (" text/latex" , p) == " \$ 1 + i + i\\ cdot x + x^{2} + (1 + i)x^{3}\$ "
1415+ @test repr (" text/latex" , p) == " \$ ( 1 + i) + i\\ cdot x + x^{2} + (1 + i)x^{3}\$ "
14161416
14171417 @test printpoly_to_string (P ([1 ,2 ,3 ], " y" )) == " 1 + 2*y + 3*y^2"
14181418 @test printpoly_to_string (P ([1 ,2 ,3 ], " y" ), descending_powers = true ) == " 3*y^2 + 2*y + 1"
14191419 @test printpoly_to_string (P ([2 , 3 , 1 ], :z ), descending_powers = true , offset = - 2 ) == " 1 + 3*z^-1 + 2*z^-2"
14201420 @test printpoly_to_string (P ([- 1 , 0 , 1 ], :z ), offset = - 1 , descending_powers = true ) == " z - z^-1"
1421- @test printpoly_to_string (P ([complex (1 ,1 ),complex (1 ,- 1 )]),MIME " text/latex" ()) == " 1 + i + (1 - i)x"
1421+ @test printpoly_to_string (P ([complex (1 ,1 ),complex (1 ,- 1 )]),MIME " text/latex" ()) == " ( 1 + i) + (1 - i)x"
14221422 end
14231423
14241424 # # closed issues
@@ -1428,7 +1428,7 @@ end
14281428 io= IOBuffer (); printpoly (io, p, compact= true , mulsymbol= " " ); @test String (take! (io)) == " 1.23457 + 2.34568x"
14291429
14301430 # # issue 278 with complex
1431- @test printpoly_to_string (Polynomial ([1 + im, 1 , 2 , im, 2im , 1 + im, 1 - im])) == " 1 + im + x + 2*x^2 + im*x^3 + 2im*x^4 + (1 + im)x^5 + (1 - im)x^6"
1431+ @test printpoly_to_string (Polynomial ([1 + im, 1 , 2 , im, 2im , 1 + im, 1 - im])) == " ( 1 + im) + x + 2*x^2 + im*x^3 + 2im*x^4 + (1 + im)x^5 + (1 - im)x^6"
14321432
14331433 # # issue #320 (fix was broken)
14341434 @test printpoly_to_string (Polynomial (BigInt[1 ,0 ,1 ], :y )) == " 1 + y^2"
0 commit comments