-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b562048
commit 9b2de66
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/// | ||
/// @file pi_deleglise_rivat.cpp | ||
/// @brief Test the pi_deleglise_rivat_64(x) function. | ||
/// @brief Test the pi_deleglise_rivat(x) function. | ||
/// | ||
/// Copyright (C) 2023 Kim Walisch, <[email protected]> | ||
/// | ||
|
@@ -44,15 +44,15 @@ int main() | |
|
||
{ | ||
int64_t x = -1; | ||
int64_t res = pi_deleglise_rivat_64(x, threads); | ||
std::cout << "pi_deleglise_rivat_64(" << x << ") = " << res; | ||
int64_t res = pi_deleglise_rivat(x, threads); | ||
std::cout << "pi_deleglise_rivat(" << x << ") = " << res; | ||
check(res == 0); | ||
} | ||
|
||
for (int64_t x = 0; x < (int64_t) pix.size(); x++) | ||
{ | ||
int64_t res = pi_deleglise_rivat_64(x, threads); | ||
std::cout << "pi_deleglise_rivat_64(" << x << ") = " << res; | ||
int64_t res = pi_deleglise_rivat(x, threads); | ||
std::cout << "pi_deleglise_rivat(" << x << ") = " << res; | ||
check(res == pix[x]); | ||
} | ||
|
||
|
@@ -63,9 +63,9 @@ int main() | |
for (int i = 0; i < 1000; i++) | ||
{ | ||
int64_t x = dist(gen); | ||
int64_t res1 = pi_deleglise_rivat_64(x, threads); | ||
int64_t res1 = pi_deleglise_rivat(x, threads); | ||
int64_t res2 = pi_legendre(x, threads); | ||
std::cout << "pi_deleglise_rivat_64(" << x << ") = " << res1; | ||
std::cout << "pi_deleglise_rivat(" << x << ") = " << res1; | ||
check(res1 == res2); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/// | ||
/// @file pi_gourdon.cpp | ||
/// @brief Test the pi_gourdon_64(x) function. | ||
/// @brief Test the pi_gourdon(x) function. | ||
/// | ||
/// Copyright (C) 2023 Kim Walisch, <[email protected]> | ||
/// | ||
|
@@ -45,15 +45,15 @@ int main() | |
|
||
{ | ||
int64_t x = -1; | ||
int64_t res = pi_gourdon_64(x, threads); | ||
std::cout << "pi_gourdon_64(" << x << ") = " << res; | ||
int64_t res = pi_gourdon(x, threads); | ||
std::cout << "pi_gourdon(" << x << ") = " << res; | ||
check(res == 0); | ||
} | ||
|
||
for (int64_t x = 0; x < (int64_t) pix.size(); x++) | ||
{ | ||
int64_t res = pi_gourdon_64(x, threads); | ||
std::cout << "pi_gourdon_64(" << x << ") = " << res; | ||
int64_t res = pi_gourdon(x, threads); | ||
std::cout << "pi_gourdon(" << x << ") = " << res; | ||
check(res == pix[x]); | ||
} | ||
|
||
|
@@ -64,9 +64,9 @@ int main() | |
for (int i = 0; i < 1000; i++) | ||
{ | ||
int64_t x = dist(gen); | ||
int64_t res1 = pi_gourdon_64(x, threads); | ||
int64_t res1 = pi_gourdon(x, threads); | ||
int64_t res2 = pi_legendre(x, threads); | ||
std::cout << "pi_gourdon_64(" << x << ") = " << res1; | ||
std::cout << "pi_gourdon(" << x << ") = " << res1; | ||
check(res1 == res2); | ||
} | ||
|
||
|