libzahl

big integer library
git clone git://git.suckless.org/libzahl
Log | Files | Refs | README | LICENSE

zsqr.3 (640B)


      1 .TH ZSQR 3 libzahl
      2 .SH NAME
      3 zsqr - Calculate the square of a big integer
      4 .SH SYNOPSIS
      5 .nf
      6 #include <zahl.h>
      7 
      8 void zsqr(z_t \fIsquare\fP, z_t \fIinteger\fP);
      9 .fi
     10 .SH DESCRIPTION
     11 .B zsqr
     12 calculates the square of an
     13 .IR integer ,
     14 and stores the result in
     15 .IR square .
     16 That is,
     17 .I square
     18 gets
     19 .IR integer ².
     20 .P
     21 It is safe to call
     22 .B zsqr
     23 with non-unique parameters.
     24 .SH RATIONALE
     25 Multiplication algorithm can be optimised if
     26 we know that the multiplier and the multiplicand
     27 are equal.
     28 .SH SEE ALSO
     29 .BR zmodmul (3),
     30 .BR zmodpow (3),
     31 .BR zstr (3),
     32 .BR zadd (3),
     33 .BR zsub (3),
     34 .BR zdiv (3),
     35 .BR zmod (3),
     36 .BR zneg (3),
     37 .BR zabs (3),
     38 .BR zpow (3)