15 #include "../math/Number.h" 19 int main(
int argc,
char **argv){
23 std::vector<Number> inValues;
29 std::ifstream insert ( argv[1] );
31 if (insert.is_open()) {
32 while (std::getline(insert,in))
33 inValues.push_back(std::stod(in));
41 for (
auto value : inValues)
44 average = sum/Number(inValues.size());
49 for (
auto value: inValues)
50 sampleSD = sampleSD + Number((value - average)^sq);
52 sampleSD = sampleSD/Number(inValues.size() - 1);
53 sampleSD = sampleSD^Number(0.5);
56 std::cout << std::flush <<
"Smerodatna odchylka = " << sampleSD << std::endl;
int main(int argc, char **argv)