The task can be considered as searching of supremums in the
directed complete partial orders [R21].

The source values are sequentially allocated by the isolated subsets
in which supremums are searched and result as Max arguments.

If the resulted supremum is single, then it is returned.

The isolated subsets are the sets of values which are only the comparable
with each other in the current set. E.g. natural numbers are comparable with
each other, but not comparable with the \(x\) symbol. Another example: the
symbol \(x\) with negative assumption is comparable with a natural number.

Also there are “least” elements, which are comparable with all others,
and have a zero property (maximum or minimum for all elements). E.g. \(oo\).
In case of it the allocation operation is terminated and only this value is
returned.

Returns real part of expression. This function performs only
elementary analysis and so it will fail to decompose properly
more complicated expressions. If completely simplified result
is needed then use Basic.as_real_imag() or perform complex
expansion on instance of this function.

SymPy, like other symbolic algebra systems, returns the
complex root of negative numbers. This is the principal
root and differs from the text-book result that one might
be expecting. For example, the cube root of -8 does not
come back as -2:

>>> root(-8,3)2*(-1)**(1/3)

The real_root function can be used to either make such a result
real or simply return the real root in the first place: