Mercurial > dropbear
comparison demo/demo.c @ 386:97db060d0ef5 libtommath-orig libtommath-0.40
Update to LibTomMath 0.40
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 11 Jan 2007 03:11:15 +0000 |
parents | 91fbc376f010 |
children |
comparison
equal
deleted
inserted
replaced
282:91fbc376f010 | 386:97db060d0ef5 |
---|---|
387 div2_n = mul2_n = inv_n = expt_n = lcm_n = gcd_n = add_n = | 387 div2_n = mul2_n = inv_n = expt_n = lcm_n = gcd_n = add_n = |
388 sub_n = mul_n = div_n = sqr_n = mul2d_n = div2d_n = cnt = add_d_n = | 388 sub_n = mul_n = div_n = sqr_n = mul2d_n = div2d_n = cnt = add_d_n = |
389 sub_d_n = 0; | 389 sub_d_n = 0; |
390 | 390 |
391 /* force KARA and TOOM to enable despite cutoffs */ | 391 /* force KARA and TOOM to enable despite cutoffs */ |
392 KARATSUBA_SQR_CUTOFF = KARATSUBA_MUL_CUTOFF = 110; | 392 KARATSUBA_SQR_CUTOFF = KARATSUBA_MUL_CUTOFF = 8; |
393 TOOM_SQR_CUTOFF = TOOM_MUL_CUTOFF = 150; | 393 TOOM_SQR_CUTOFF = TOOM_MUL_CUTOFF = 16; |
394 | 394 |
395 for (;;) { | 395 for (;;) { |
396 /* randomly clear and re-init one variable, this has the affect of triming the alloc space */ | 396 /* randomly clear and re-init one variable, this has the affect of triming the alloc space */ |
397 switch (abs(rand()) % 7) { | 397 switch (abs(rand()) % 7) { |
398 case 0: | 398 case 0: |
732 } | 732 } |
733 } | 733 } |
734 } | 734 } |
735 return 0; | 735 return 0; |
736 } | 736 } |
737 | |
738 /* $Source: /cvs/libtom/libtommath/demo/demo.c,v $ */ | |
739 /* $Revision: 1.3 $ */ | |
740 /* $Date: 2005/06/24 11:32:07 $ */ |