Skip to content
Snippets Groups Projects
Commit 057f7b65 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent 27d7972f
No related branches found
No related tags found
1 merge request!1077Improved multipole acceptance criterion (MAC)
...@@ -32,14 +32,12 @@ ...@@ -32,14 +32,12 @@
* @param b Second value * @param b Second value
* @param s String used to identify this check in messages * @param s String used to identify this check in messages
*/ */
void check_value(double a, double b, const double tol, const double x) { void check_value(double a, double b, const double tol, const double x) {
if (fabs(a - b) / fabs(a + b) > tol) if (fabs(a - b) / fabs(a + b) > tol)
error( error("Values are inconsistent: %12.15e %12.15e rel=%e (for x=%e).", a, b,
"Values are inconsistent: %12.15e %12.15e rel=%e (for x=%e).", fabs(a - b) / fabs(a + b), x);
a, b, fabs(a - b) / fabs(a + b), x);
} }
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
/* Initialize CPU frequency, this also starts time. */ /* Initialize CPU frequency, this also starts time. */
...@@ -58,7 +56,7 @@ int main(int argc, char* argv[]) { ...@@ -58,7 +56,7 @@ int main(int argc, char* argv[]) {
/* Loop over some values */ /* Loop over some values */
for (float x = 0.; x < 32.; x += 0.000001) { for (float x = 0.; x < 32.; x += 0.000001) {
const double exact_p = exp(x); const double exact_p = exp(x);
const double exact_n = exp(-x); const double exact_n = exp(-x);
const double swift_exp_p = optimized_expf(x); const double swift_exp_p = optimized_expf(x);
...@@ -70,4 +68,3 @@ int main(int argc, char* argv[]) { ...@@ -70,4 +68,3 @@ int main(int argc, char* argv[]) {
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment