/* bs01r.f -- translated by f2c (version 20000817).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Subroutine */ int bs01r_c(real *data, integer *n, real *ave, real *adev,
real *var, real *sdev)
{
/* System generated locals */
integer i__1;
/* Builtin functions */
double sqrt(doublereal);
/* Local variables */
static integer j;
static real p, s;
/* IF(N.LE.1)PAUSE 'N must be at least 2' */
/* Parameter adjustments */
--data;
/* Function Body */
s = 0.f;
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
s += data[j];
/* L11: */
}
*ave = s / *n;
*adev = 0.f;
*var = 0.f;
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
s = data[j] - *ave;
*adev += abs(s);
p = s * s;
*var += p;
/* L12: */
}
*adev /= *n;
*var /= *n - 1;
*sdev = (real)sqrt(*var);
return 0;
} /* bs01r_c */