by CodeMage · 14y ago · 0 comments
int price = getPrice(symbol);
double signal = exp(...) * ((double)price);
if (signal > threshold) {
buy(symbol);
}
The point is to avoid converting from int to double every single time you need to do a calculation.