Pure Programmer
Blue Matrix


Cluster Map

Project: Standard Deviation

Write a filter program that accepts text representations of floating point values on the standard input, one per line. The program should then compute the standard deviation of a list of floating point values. Finally the program should simply output the value of the standard deviation to 16 decimal places on a single line so that it can easily be used by other programs.

Output
$ g++ -std=c++17 StandardDeviation.cpp -o StandardDeviation -lfmt $ ./StandardDeviation < ../../data/text/FPList1.txt 3.044254700191653 $ g++ -std=c++17 StandardDeviation.cpp -o StandardDeviation -lfmt $ ./StandardDeviation < ../../data/text/FPList2.txt 28.73476724602558 $ g++ -std=c++17 StandardDeviation.cpp -o StandardDeviation -lfmt $ ./StandardDeviation < ../../data/text/FPList3.txt 289.2240743417168

Solution