Hi,

The output of the following test code is nan. I don't think this is the
desired behavior for users. When number of input data is 1, I think it is
more reasonable to say standard deviation is 0 instead of nan.

thanks,
Ming

#include <iostream>
#include <gsl/gsl_statistics.h>

itn main()
{
    double data[1] = {1.0};
    double sd = gsl_stats_sd(data, 1, 1);
    std::cout << sd << std::endl;
    return 0;
}

Reply via email to