5 #include "CLHEP/Evaluator/Evaluator.h"
9 static double eval_abs (
double a) {
return (a < 0) ? -a :
a; }
10 static double eval_min (
double a,
double b) {
return (a < b) ? a : b; }
11 static double eval_max (
double a,
double b) {
return (a > b) ? a : b; }
12 static double eval_sqrt (
double a) {
return std::sqrt(a); }
13 static double eval_pow (
double a,
double b) {
return std::pow(a,b); }
14 static double eval_sin (
double a) {
return std::sin(a); }
15 static double eval_cos (
double a) {
return std::cos(a); }
16 static double eval_tan (
double a) {
return std::tan(a); }
17 static double eval_asin (
double a) {
return std::asin(a); }
18 static double eval_acos (
double a) {
return std::acos(a); }
19 static double eval_atan (
double a) {
return std::atan(a); }
20 static double eval_atan2(
double a,
double b) {
return std::atan2(a,b); }
21 static double eval_sinh (
double a) {
return std::sinh(a); }
22 static double eval_cosh (
double a) {
return std::cosh(a); }
23 static double eval_tanh (
double a) {
return std::tanh(a); }
24 static double eval_exp (
double a) {
return std::exp(a); }
25 static double eval_log (
double a) {
return std::log(a); }
30 void Evaluator::setStdMath() {
34 setVariable(
"pi", 3.14159265358979323846);
35 setVariable(
"e", 2.7182818284590452354);
36 setVariable(
"gamma", 0.577215664901532861);
37 setVariable(
"radian", 1.0);
38 setVariable(
"rad", 1.0);
39 setVariable(
"degree", 3.14159265358979323846/180.);
40 setVariable(
"deg", 3.14159265358979323846/180.);
static double eval_min(double a, double b)
static double eval_pow(double a, double b)
static double eval_acos(double a)
static double eval_sin(double a)
static double eval_asin(double a)
static double eval_exp(double a)
static double eval_abs(double a)
static double eval_max(double a, double b)
static double eval_sqrt(double a)
static double eval_atan(double a)
static double eval_tanh(double a)
static double eval_atan2(double a, double b)
static double eval_sinh(double a)
static double eval_log(double a)
static double eval_cos(double a)
static double eval_cosh(double a)
static double eval_log10(double a)
static double eval_tan(double a)