COHERENT manpages

This page displays the COHERENT manpage for msqrt() [Compute square root of multiple-precision integer].

List of available manpages
Index


msqrt() -- Multiple-Precision Mathematics (libmp)

Compute square root of multiple-precision integer
#include <mprec.h>
void msqrt(a, b, r)
mint *a, *b, *r;

msqrt() sets  the multiple-precision integer  (or mint) pointed to  by b to
the integral portion of the positive  square root of the mint pointed to by
a. It sets the mint pointed to by r to the remainder.  The value pointed to
by a must  not be negative.  The result of  the operation is defined by the
condition

    a = b * b + r.

See Also

libmp