@Override
    protected boolean onExecute() {
        getArg(0).execute();
        double result = switch (fnc) {
            case EXP -> Math.exp(getArg(0).getResult().getFloat());
            case POW -> Math.pow(getArg(0).getResult().getFloat(), getArg(1).getResult().getFloat());
            case LOG -> Math.log(getArg(0).getResult().getFloat());
            case LOG1P -> Math.log1p(getArg(0).getResult().getFloat());
            case LOG10 -> Math.log10(getArg(0).getResult().getFloat());
            case SIN -> Math.sin(getArg(0).getResult().getFloat());
            case ASIN -> Math.asin(getArg(0).getResult().getFloat());
            case COS -> Math.cos(getArg(0).getResult().getFloat());
            case ACOS -> Math.acos(getArg(0).getResult().getFloat());
            case TAN -> Math.tan(getArg(0).getResult().getFloat());
            case ATAN -> Math.atan(getArg(0).getResult().getFloat());
            case SQRT -> Math.sqrt(getArg(0).getResult().getFloat());
            case SINH -> Math.sinh(getArg(0).getResult().getFloat());
            case ASINH -> throw new IllegalArgumentException("Inverse hyperbolic sine(asinh) is not supported in java");
            case COSH -> Math.cosh(getArg(0).getResult().getFloat());
            case ACOSH ->
                    throw new IllegalArgumentException("Inverse hyperbolic cosine (acosh) is not supported in java");
            case TANH -> Math.tanh(getArg(0).getResult().getFloat());
            case ATANH ->
                    throw new IllegalArgumentException("Inverse hyperbolic tangents (atanh) is not supported in java");
            case FLOOR -> Math.floor(getArg(0).getResult().getFloat());
            case CBRT -> Math.cbrt(getArg(0).getResult().getFloat());
            case HYPOT -> Math.hypot(getArg(0).getResult().getFloat(), getArg(1).getResult().getFloat());
        };
        ((FloatResultNode)getResult()).setValue(result);
        return true;
    }
This function is an instruction to negate its argument.

@author baldersheim
@author Simon Thoresen Hult
searchlib/src/main/java/com/yahoo/searchlib/expression/MathFunctionNode.java