MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / DoubleEquals

Function DoubleEquals

src/test/blockchain_tests.cpp:21–24  ·  view source on GitHub ↗

Equality between doubles is imprecise. Comparison should be done * with a small threshold of tolerance, rather than exact equality. */

Source from the content-addressed store, hash-verified

19 * with a small threshold of tolerance, rather than exact equality.
20 */
21static bool DoubleEquals(double a, double b, double epsilon)
22{
23 return std::abs(a - b) < epsilon;
24}
25
26static CBlockIndex* CreateBlockIndexWithNbits(uint32_t nbits)
27{

Callers 1

RejectDifficultyMismatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected