1 | initial version |
In many settings,
When working with the real numbers, - zero is its own unique square root - positive numbers have two square roots in the real numbers - negative numbers have no square root in the real numbers, but two square roots in the complex numbers
The two square roots of a positive number being opposite to each other, one is negative and one is positive. Since we find positive numbers more "natural", we often decide to give the positive root a special role and to call it "square root of $y$", which could be thought of as short for "the positive square root of $y$". The other root is then referred to as "minus square root of $y$".
In computer algebra systems, one has to decide what to do when the
user asks for square roots a command such as sqrt(y)
or y.sqrt()
:
I suppose the documentation you are referring to is the
SageMath documentation for sage.structure.element.CommutativeRingElement.sqrt
.
It explains that y.sqrt()
takes two optional parameters,
extend
to decide whether to look for square roots in a
larger ring if necessary, and all
to decide whether to
return all square roots or a preferred square root when
there is one. There's an additional optional parameter
name
to name the extra generator of the new ring if you
decide to extend.