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

Function DoubleEquals

src/test/blockchain_tests.cpp:11–14  ·  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

9 * with a small threshold of tolerance, rather than exact equality.
10 */
11static bool DoubleEquals(double a, double b, double epsilon)
12{
13 return std::abs(a - b) < epsilon;
14}
15
16static CBlockIndex* CreateBlockIndexWithNbits(uint32_t nbits)
17{

Callers 1

RejectDifficultyMismatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected