-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Description
I'm trying to evaluate the following expression:
sin x - (0.02449*x^3)-(1.67049*x)+(64.85606+(0.33683*x^2))+(sin (2*x))
Using this code:
String equation = "sin x - (0.02449*x^3)-(1.67049*x)+(64.85606+(0.33683*x^2))+(sin (2*x))";
Expression exp = new ExpressionBuilder(equation)
.variables("x")
.build()
.setVariable("x", 1);
System.out.println(exp.evaluate()); // prints 0.5364612580927792
But according to WolframAlpha the correct result is 65.2487
Here is the direct link to WolframAlpha
I'm using version 0.4.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels