MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / getRelDif

Function getRelDif

tests/utils/compare.cpp:64–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64qreal getRelDif(qcomp a, qcomp b) {
65
66 qreal denom = std::min({std::abs(a), std::abs(b)});
67 return getAbsDif(a,b) / denom;
68}
69
70
71bool doScalarsAgree(qcomp a, qcomp b) {

Callers 4

doScalarsAgreeFunction · 0.85
REPORT_AMP_AND_FAILFunction · 0.85
REPORT_SCALAR_AND_FAILFunction · 0.85
REPORT_ELEM_AND_FAILFunction · 0.85

Calls 1

getAbsDifFunction · 0.85

Tested by

no test coverage detected