Search in sources :

Example 21 with RealUnaryExpression

use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.

the class TANH method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue realExpression = this.getSymbRealArgument(0);
    RealValue tanhExpr;
    if (realExpression.containsSymbolicVariable()) {
        Operator op = Operator.TANH;
        tanhExpr = new RealUnaryExpression(realExpression, op, res);
    } else {
        tanhExpr = this.getSymbRealRetVal();
    }
    return tanhExpr;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) Operator(org.evosuite.symbolic.expr.Operator) RealUnaryExpression(org.evosuite.symbolic.expr.fp.RealUnaryExpression)

Example 22 with RealUnaryExpression

use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.

the class ToRadians method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue realExpression = this.getSymbRealArgument(0);
    RealValue toRadiansExpr;
    if (realExpression.containsSymbolicVariable()) {
        Operator op = Operator.TORADIANS;
        toRadiansExpr = new RealUnaryExpression(realExpression, op, res);
    } else {
        toRadiansExpr = this.getSymbRealRetVal();
    }
    return toRadiansExpr;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) Operator(org.evosuite.symbolic.expr.Operator) RealUnaryExpression(org.evosuite.symbolic.expr.fp.RealUnaryExpression)

Example 23 with RealUnaryExpression

use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.

the class EXPM1 method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue realExpression = this.getSymbRealArgument(0);
    RealValue expm1Expr;
    if (realExpression.containsSymbolicVariable()) {
        Operator op = Operator.EXPM1;
        expm1Expr = new RealUnaryExpression(realExpression, op, res);
    } else {
        expm1Expr = this.getSymbRealRetVal();
    }
    return expm1Expr;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) Operator(org.evosuite.symbolic.expr.Operator) RealUnaryExpression(org.evosuite.symbolic.expr.fp.RealUnaryExpression)

Aggregations

RealUnaryExpression (org.evosuite.symbolic.expr.fp.RealUnaryExpression)23 RealValue (org.evosuite.symbolic.expr.fp.RealValue)23 Operator (org.evosuite.symbolic.expr.Operator)21