Post
Topic
Board Mining (Altcoins)
Re: [ANN] ccminer 2.3 - opensource - GPL (tpruvot)
by
igorsantos
on 23/03/2019, 18:46:06 UTC
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)))));

ok, thanks. Cheesy