36 #ifndef GTEST_SAMPLES_PRIME_TABLES_H_
37 #define GTEST_SAMPLES_PRIME_TABLES_H_
47 virtual bool IsPrime(
int n)
const = 0;
58 if (n <= 1)
return false;
60 for (
int i = 2;
i*
i <= n; i++) {
62 if ((n % i) == 0)
return false;
71 for (
int n = p + 1;;
n++) {
107 for (
int i = 2;
i*
i <=
max; i += i%2+1) {
113 for (
int j = i*i; j <=
max; j +=
i) {
126 #endif // GTEST_SAMPLES_PRIME_TABLES_H_
SimpleFad< ValueT > max(const SimpleFad< ValueT > &a, const SimpleFad< ValueT > &b)