(MathParser parser, String variableName, String exp, double x)
| 220 | } |
| 221 | |
| 222 | public static double derivative(MathParser parser, String variableName, String exp, double x) throws MathParserException { |
| 223 | if (!Utils.isIdentifier(variableName)) |
| 224 | throw new MathInvalidParameterException("derivative(): invalid variable name (" + variableName + ")"); |
| 225 | |
| 226 | MathParser newParser = parser.clone(); |
| 227 | newParser.setRoundEnabled(false); |
| 228 | newParser.addVariable(variableName, 0, 0); |
| 229 | MathParser.MathVariable variable = newParser.getVariable(variableName); |
| 230 | return Derivative.getDerivative(new FunctionWrapper(newParser, exp, variable), x); |
| 231 | } |
| 232 | |
| 233 | public static double intg(MathParser parser, String variableName, String exp, double lowerLimit, double upperLimit) throws MathParserException { |
| 234 | return integral(parser, variableName, exp, lowerLimit, upperLimit, 20); |
nothing calls this directly
no test coverage detected