so the documentation for valarray says pow is implemented for both pow(valarray<T>&base, T&exponent) and pow(T&base, valarray<T>&exponents)
so why is it that the following:
Code:
valarray<double>history;
pow(history-average(),2);
is invalid? it says "could not find a match for pow<_Tp>(valarray<double>,int)"? casting 2 to double results in the same message, just replacing int with double in the error message.
i'd like to:
Code:
double stdev = pow(pow(history-average(),2).sum()/history.size(),.5);
;
is there some file i need to include besides math and valarray?
the doc makes no mention of it...
it's probably just something silly i'm overlooking, but anyone who can spot it gets my thanks