CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

testBug90848.cc File Reference

#include <stdlib.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include "CLHEP/Evaluator/Evaluator.h"

Go to the source code of this file.

Classes

class  MyEvaluator
struct  Test

Functions

int main ()

Variables

Test tests []


Function Documentation

int main (  ) 

Definition at line 55 of file testBug90848.cc.

References MyEvaluator::evaluate(), exit, Test::expr, MyEvaluator::isOK(), HepTool::Evaluator::setVariable(), tests, Test::value1, and Test::value2.


Variable Documentation

Test tests[]

Initial value:

 {
        { "x",                                  1.0,            10.0},
        { "y",                                  2.0,            -20.0},
        { "z",                                  3.0,            -30.0},
        { "x+y",                                3.0,            -10.0},
        { "-z",                                 -3.0,           30.0},
        { "0-z",                                -3.0,           30.0},
        { "0 - -z",                             3.0,            -30.0},
        { "10/-x",                              -10.0,          -1.0},
        { "exp(-y)*exp(y)",                     1.0,            1.0},
        { "exp(-y^2)*exp(y^2)",                 1.0,            1.0},
        { "-5*x",                               -5.0,           -50.0},
        { "5+-x",                               4.0,            -5.0},
        { "5+(-x)",                             4.0,            -5.0},
        { "5*-x",                               -5.0,           -50.0},
        { "5*(-x)",                             -5.0,           -50.0},
        { "-z^2",                               -9.0,           -900.0},
        { "0-z^2",                              -9.0,           -900.0},
        { "exp(-0.2*z^2)*exp(0.2*z^2)",         1.0,            1.0},
        { "exp(0.2*-z^2)*exp(0.2*z^2)",         1.0,            1.0},
        { "exp(-z^2*0.2)*exp(0.2*z^2)",         1.0,            1.0},
        { "exp(0.2*-(z^2))*exp(0.2*z^2)",       1.0,            1.0},
        { "exp(-(z^2)*0.2)*exp(0.2*z^2)",       1.0,            1.0},
        { "exp(-0.2*z)*exp(0.2*z)",             1.0,            1.0},
        { "exp(0.2*-z)*exp(0.2*z)",             1.0,            1.0},
        { "exp(-z*0.2)*exp(0.2*z)",             1.0,            1.0},
}

Definition at line 27 of file testBug90848.cc.

Referenced by main().


Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7