https://github.com/cran/soobench
Raw File
Tip revision: 81acd25d0a6c5bebba5e330b793ab525b3afd415 authored by Eric Kalosa-Kenyon on 09 February 2020, 15:30:02 UTC
version 1.9.18
Tip revision: 81acd25
f_discus.c
#include "soobench.h"

const double f_discus(const double *x, const size_t n) {
  double sum = x[0] * x[0] * 1.0e6;
  size_t i;
  for (i = 1; i < n; ++i) {
    sum += x[i] * x[i];
  }
  return sum;
}
back to top