Lines Matching refs:b2
68 mpint *b1, *b2; in testshift() local
72 b2 = mpnew(0); in testshift()
74 mpleft(b1, i, b2); in testshift()
75 print("%2.2d %B\n", i, b2); in testshift()
78 mpright(b2, i, b1); in testshift()
82 mpfree(b2); in testshift()
88 mpint *b1, *b2; in testaddsub() local
92 b2 = mpnew(0); in testaddsub()
94 mpadd(b1, b2, b2); in testaddsub()
95 print("%2.2d %B\n", i, b2); in testaddsub()
98 mpsub(b2, b1, b2); in testaddsub()
99 print("%2.2d %B\n", i, b2); in testaddsub()
102 mpfree(b2); in testaddsub()
108 mpint *b, *b2; in testvecdigmuladd() local
113 b2 = mpnew(0); in testvecdigmuladd()
115 mpbits(b2, (b->top+1)*Dbits); in testvecdigmuladd()
118 memset(b2->p, 0, b2->top*Dbytes); in testvecdigmuladd()
119 mpvecdigmuladd(b->p, b->top, d, b2->p); in testvecdigmuladd()
123 mpnorm(b2); in testvecdigmuladd()
124 print("0 + %B * %ux = %B\n", b, d, b2); in testvecdigmuladd()
127 mpfree(b2); in testvecdigmuladd()
133 mpint *b, *b2; in testvecdigmulsub() local
138 b2 = mpnew(0); in testvecdigmulsub()
140 mpbits(b2, (b->top+1)*Dbits); in testvecdigmulsub()
143 memset(b2->p, 0, b2->top*Dbytes); in testvecdigmulsub()
144 mpvecdigmulsub(b->p, b->top, d, b2->p); in testvecdigmulsub()
148 mpnorm(b2); in testvecdigmulsub()
149 print("0 - %B * %ux = %B\n", b, d, b2); in testvecdigmulsub()
152 mpfree(b2); in testvecdigmulsub()
158 mpint *b, *b1, *b2; in testmul() local
164 b2 = mpnew(0); in testmul()
168 mpmul(b, b1, b2); in testmul()
172 print("%B * %B = %B\n", b, b1, b2); in testmul()
176 mpfree(b2); in testmul()
182 mpint *b2; in testmul2() local
186 b2 = mpnew(0); in testmul2()
190 mpmul(b, b1, b2); in testmul2()
195 print("%B\n", b2); in testmul2()
197 mpfree(b2); in testmul2()
221 mpint *b2, *b3; in testdiv() local
225 b2 = mpnew(0); in testdiv()
229 mpdiv(x, y, b2, b3); in testdiv()
233 print("%B / %B = %B %B\n", x, y, b2, b3); in testdiv()
234 mpfree(b2); in testdiv()
287 mpint *b1, *b2, *b3; in testsub1() local
290 b2 = strtomp(b, nil, 16, nil); in testsub1()
292 mpsub(b1, b2, b3); in testsub1()
293 print("%B - %B = %B\n", b1, b2, b3); in testsub1()
299 mpint *b1, *b2, *b3; in testmul1() local
302 b2 = strtomp(b, nil, 16, nil); in testmul1()
304 mpmul(b1, b2, b3); in testmul1()
305 print("%B * %B = %B\n", b1, b2, b3); in testmul1()