MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / doubleEqual0

Function doubleEqual0

check/TestUserScale.cpp:10–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8const double inf = kHighsInf;
9
10bool doubleEqual0(const double v0, const double v1) {
11 double rel_difference = std::fabs(v0 - v1) / std::max(1.0, std::fabs(v0));
12 bool ok = rel_difference < 1e-12;
13 if (
14 // dev_run &&
15 !ok)
16 printf("UserScaleDoubleEqual: %g and %g have relative difference = %g\n",
17 v0, v1, rel_difference);
18 return ok;
19}
20
21TEST_CASE("user-scale-after-run", "[highs_user_scale]") {
22 const std::string mip_model = "flugpl"; //"rgn";//

Callers 2

TestUserScale.cppFile · 0.85
testUserScaleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected