minor changes, trim trailing spaces
This commit is contained in:
parent
3a80f80039
commit
f7b194f741
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
*.lof
|
||||
*.log
|
||||
*.toc
|
||||
*.out
|
||||
|
||||
test
|
||||
test.exe
|
||||
|
6
makefile
6
makefile
@ -10,7 +10,9 @@ ifndef PREFIX
|
||||
PREFIX=
|
||||
endif
|
||||
|
||||
CC?=$(PREFIX)gcc
|
||||
ifeq ($(CC),cc)
|
||||
CC = $(PREFIX)gcc
|
||||
endif
|
||||
LD=$(PREFIX)ld
|
||||
AR=$(PREFIX)ar
|
||||
RANLIB=$(PREFIX)ranlib
|
||||
@ -164,7 +166,7 @@ clean:
|
||||
rm -f `find . -type f -name "*.dyn" | xargs`
|
||||
rm -f `find . -type f -name "*.dpi" | xargs`
|
||||
rm -rf `find . -type d -name "*.libs" | xargs`
|
||||
rm -f tfm.aux tfm.dvi tfm.idx tfm.ilg tfm.ind tfm.lof tfm.log tfm.toc test test.exe
|
||||
rm -f tfm.aux tfm.dvi tfm.idx tfm.ilg tfm.ind tfm.lof tfm.log tfm.out tfm.toc test test.exe
|
||||
cd mtest; MAKE=${MAKE} ${MAKE} clean
|
||||
|
||||
no_oops: clean
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* TomsFastMath, a fast ISO C bignum library.
|
||||
*
|
||||
*
|
||||
* This project is meant to fill in where LibTomMath
|
||||
* falls short. That is speed ;-)
|
||||
*
|
||||
* This project is public domain and free for all purposes.
|
||||
*
|
||||
*
|
||||
* Tom St Denis, tomstdenis@gmail.com
|
||||
*/
|
||||
#include <tfm.h>
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* TomsFastMath, a fast ISO C bignum library.
|
||||
*
|
||||
*
|
||||
* This project is meant to fill in where LibTomMath
|
||||
* falls short. That is speed ;-)
|
||||
*
|
||||
* This project is public domain and free for all purposes.
|
||||
*
|
||||
*
|
||||
* Tom St Denis, tomstdenis@gmail.com
|
||||
*/
|
||||
#include <tfm.h>
|
||||
@ -58,7 +58,7 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback
|
||||
err = FP_VAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
/* work over the MSbyte */
|
||||
tmp[0] &= maskAND;
|
||||
tmp[0] |= 1 << ((size - 1) & 7);
|
||||
@ -78,7 +78,7 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback
|
||||
/* see if (a-1)/2 is prime */
|
||||
fp_sub_d(a, 1, a);
|
||||
fp_div_2(a, a);
|
||||
|
||||
|
||||
/* is it prime? */
|
||||
res = fp_isprime(a);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user