Skip to content

math-gout/primality-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

primality-check

Small header file for fast 64 bits primality check

Usage example

#include <stdlib.h>
#include <stdio.h>

#include "isprime64.h"

int main(int argc, char *argv[]) {
	uint64_t n = 173299173648191741;
	if (isprime64(n)) printf("%llu is prime\n", n);
	else printf("%llu is not prime\n", n);
}

About

Small header file for fast 64 bits primality check

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages