My Project
Loading...
Searching...
No Matches
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
}
p
int p
Definition:
cfModGcd.cc:4078
iiIsPrime0
static int iiIsPrime0(unsigned p)
Definition:
prime.cc:12
Generated on Mon Feb 27 2023 10:53:52 for My Project by
doxygen 1.9.5
for
Singular