Post
Topic
Board Mining (Altcoins)
Merits 13 from 2 users
Re: [ANN] ccminer 2.3 - opensource - GPL (tpruvot)
by
Schleicher
on 12/03/2019, 16:43:01 UTC
⭐ Merited by scryptr (10) ,vapourminer (3)
That's because sqrt() only uses floating point variables (float, double, or long double).
Adding casts to double should fix the error:

Code:
for(uint64_t i = 3; i < sqrt((double)number); i += 2) {

Code:
uint64_t sz = NIGHTCAP_CACHE_BYTES_INIT + (NIGHTCAP_CACHE_BYTES_GROWTH * round(sqrt((double)(6 * (block_number / NIGHTCAP_EPOCH_LENGTH)))));

Code:
uint64_t sz = NIGHTCAP_DATASET_BYTES_INIT + (NIGHTCAP_DATASET_BYTES_GROWTH * round(sqrt((double)(6 * (block_number / NIGHTCAP_EPOCH_LENGTH)))));