mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
removed scaling during assert checks
This commit is contained in:
parent
957fe5c6ce
commit
ef957bae98
@ -152,7 +152,7 @@ void test1() {
|
|||||||
|
|
||||||
std::cout << minima << "...";
|
std::cout << minima << "...";
|
||||||
|
|
||||||
assert(std::abs(minima - 2) < EPSILON * 2);
|
assert(std::abs(minima - 2) < EPSILON);
|
||||||
std::cout << "passed\n";
|
std::cout << "passed\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ void test2() {
|
|||||||
|
|
||||||
std::cout << minima << " (" << M_E << ")...";
|
std::cout << minima << " (" << M_E << ")...";
|
||||||
|
|
||||||
assert(std::abs(minima - M_E) < EPSILON * 2);
|
assert(std::abs(minima - M_E) < EPSILON);
|
||||||
std::cout << "passed\n";
|
std::cout << "passed\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ void test3() {
|
|||||||
|
|
||||||
std::cout << minima << " (" << M_PI << ")...";
|
std::cout << minima << " (" << M_PI << ")...";
|
||||||
|
|
||||||
assert(std::abs(minima - M_PI) < EPSILON * 2);
|
assert(std::abs(minima - M_PI) < EPSILON);
|
||||||
std::cout << "passed\n";
|
std::cout << "passed\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user