Using a better algorithm based on property of primes.
I recently found out that `p` being prime, while `p > 3`, then `p = 6*k (+/-) 1`.
This commit is contained in:
2
Makefile
2
Makefile
@ -22,7 +22,7 @@ LDFLAGS=-lgmp
|
||||
DEFS=-DVERSION=\"2.0\" -DAPP_NAME=\"Indivisible\"
|
||||
CFLAGS=$(INCFLAGS) $(DEFS) -std=c99 -Wall -Wextra -Wfatal-errors -Werror
|
||||
HDRS=src/globals.h src/llist.h
|
||||
OBJS=src/main.o src/llist.o
|
||||
OBJS=src/llist.o src/main.o src/prime_test.o
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS+=-g -O0 -DDEBUG
|
||||
|
Reference in New Issue
Block a user