Given a natural radicand, return its square root.
Note that the term "radicand" refers to the number for which the root is to be determined. That is, it is the number under the root symbol.
Check out the Wikipedia pages on square root and methods of computing square roots.
Recall also that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up).
Register | Usage | Type | Description |
---|---|---|---|
$a0 |
input | integer | radicand |
$v0 |
output | integer | square root |
$t0-9 |
temporary | any | used for temporary storage |
Sign up to Exercism to learn and master MIPS Assembly with 47 exercises, and real human mentoring, all for free.