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

Function isApprox

quest/src/core/utilities.cpp:473–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471 */
472
473bool isApprox(qreal a, qreal b, qreal eps) {
474 return std::abs(a-b) <= eps;
475}
476bool isApprox(qcomp a, qcomp b, qreal eps) {
477 return std::norm(a-b) <= eps;
478}

Callers 3

getUnitarityFunction · 0.85
getHermiticityFunction · 0.85
getWhetherNonZeroFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected