My Project
UNKNOWN_GIT_VERSION
libpolys
misc
Functions
prime.h File Reference
Go to the source code of this file.
Functions
int
IsPrime
(int
p
)
Function Documentation
◆
IsPrime()
int IsPrime
(
int
p
)
Definition at line
61
of file
prime.cc
.
62
{
63
if
(
p
== 0)
return
0;
64
else
if
(
p
== 1)
return
1
/*1*/
;
65
else
if
((
p
== 2)||(
p
==3))
return
p
;
66
else
if
(
p
< 0)
return
2;
//(iiIsPrime0((unsigned)(-p)));
67
else
if
((
p
& 1)==0)
return
iiIsPrime0
((
unsigned
)(
p
-1));
68
return
iiIsPrime0
((
unsigned
)(
p
));
69
}
iiIsPrime0
static int iiIsPrime0(unsigned p)
Definition:
prime.cc:12
p
int p
Definition:
cfModGcd.cc:4019
Generated on Wed Mar 4 2020 00:00:00 for My Project by
doxygen 1.8.17
for
Singular UNKNOWN_GIT_VERSION