Various bugfixes and additions
This commit is contained in:
parent
14c3182200
commit
44876f0926
24 changed files with 889 additions and 187 deletions
26
eo/contrib/mathsym/eval/MultiFuncs.cpp
Normal file
26
eo/contrib/mathsym/eval/MultiFuncs.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
namespace multi_function {
|
||||
|
||||
double plus(arg_ptr args) {
|
||||
return *args[0] + *args[1];
|
||||
}
|
||||
|
||||
double mult(arg_ptr args) {
|
||||
return *args[0] * *args[1];
|
||||
}
|
||||
|
||||
double min(arg_ptr args) {
|
||||
return -**args;
|
||||
}
|
||||
|
||||
double inv(arg_ptr args) {
|
||||
return 1 / **args;
|
||||
}
|
||||
|
||||
//template <typename f> class F { public: double operator()(double a) { return f(a); } };
|
||||
|
||||
double exp(arg_ptr args) {
|
||||
return ::exp(**args);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
Reference in a new issue