1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
// Author:       Andreas F. Borchert
// Description:  sinus function as extension of Function

#include <cmath>
#include <string>
#include "Cosinus.hpp"

static const std::string name = "cos";

const std::string& Cosinus::get_name() const {
   return name;
// Cosinus::get_name()

double Cosinus::execute(double x) const {
   return std::cos(x);
// Cosinus::execute

extern "C" Function* construct() {
   return new Cosinus();
}