#NEWLINE# def test__nsort( ) : #NEWLINE# #INDENT# r = S ( '[3/2 + sqrt(-14/3 - 2*(-415/216 + 13*I/12)**(1/3) - 4/sqrt(-7/3 +\n    61/(18*(-415/216 + 13*I/12)**(1/3)) + 2*(-415/216 + 13*I/12)**(1/3)) -\n    61/(18*(-415/216 + 13*I/12)**(1/3)))/2 - sqrt(-7/3 + 61/(18*(-415/216\n    + 13*I/12)**(1/3)) + 2*(-415/216 + 13*I/12)**(1/3))/2, 3/2 - sqrt(-7/3\n    + 61/(18*(-415/216 + 13*I/12)**(1/3)) + 2*(-415/216 +\n    13*I/12)**(1/3))/2 - sqrt(-14/3 - 2*(-415/216 + 13*I/12)**(1/3) -\n    4/sqrt(-7/3 + 61/(18*(-415/216 + 13*I/12)**(1/3)) + 2*(-415/216 +\n    13*I/12)**(1/3)) - 61/(18*(-415/216 + 13*I/12)**(1/3)))/2, 3/2 +\n    sqrt(-14/3 - 2*(-415/216 + 13*I/12)**(1/3) + 4/sqrt(-7/3 +\n    61/(18*(-415/216 + 13*I/12)**(1/3)) + 2*(-415/216 + 13*I/12)**(1/3)) -\n    61/(18*(-415/216 + 13*I/12)**(1/3)))/2 + sqrt(-7/3 + 61/(18*(-415/216\n    + 13*I/12)**(1/3)) + 2*(-415/216 + 13*I/12)**(1/3))/2, 3/2 + sqrt(-7/3\n    + 61/(18*(-415/216 + 13*I/12)**(1/3)) + 2*(-415/216 +\n    13*I/12)**(1/3))/2 - sqrt(-14/3 - 2*(-415/216 + 13*I/12)**(1/3) +\n    4/sqrt(-7/3 + 61/(18*(-415/216 + 13*I/12)**(1/3)) + 2*(-415/216 +\n    13*I/12)**(1/3)) - 61/(18*(-415/216 + 13*I/12)**(1/3)))/2]' ) #NEWLINE# ans = [ r [ 1 ] , r [ 0 ] , r [ ( - 1 ) ] , r [ ( - 2 ) ] ] #NEWLINE# assert ( _nsort ( r ) == ans ) #NEWLINE# assert ( len ( _nsort ( r , separated = True ) [ 0 ] ) == 0 ) #NEWLINE# ( b , c , a ) = ( exp ( ( - 1000 ) ) , exp ( ( - 999 ) ) , exp ( ( - 1001 ) ) ) #NEWLINE# assert ( _nsort ( ( b , c , a ) ) == [ a , b , c ] )