private static boolean isPrime(final long num) {
    if (num > 2 && (num & 1) == 0) {
      return false;
    }
    for (long i = 3; i * i <= num; i += 2) {
      if (num % i == 0) {
        return false;
      }
    }
    return true;
  }
Calculates EthHash DataSet size at a given epoch.

@param epoch EthHash Epoch
@return DataSet size
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/EthHash.java