Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/math/Maths.java
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,7 @@ public static void main(String args[]) {
System.out.println(" RUNTIME = " + ((t4 - t3) / 1.0E6) + " ms");


System.out.println(" fact = " + fact("0.01"));
}
/*We use the principle:
* pi=(magic_whole_no)*(SUM(i^-n))^(1/n) < where i goes from 1 to infinity during summation >
Expand Down
357 changes: 357 additions & 0 deletions src/main/java/parser/BigMathExpression.java

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/main/java/parser/Function.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public double calc(double... x) {
return Double.NaN;
}

public static boolean assignObject(String input) {
public static boolean assignObject(String input, Class mathExpClass) {

/**
* Check if it is a function assignment operation...e.g:
Expand Down Expand Up @@ -273,9 +273,10 @@ public static boolean assignObject(String input) {

success = true;
} else {
MathExpression expr = new MathExpression(rhs);
MathExpression expr = mathExpClass == BigMathExpression.class ? new BigMathExpression(rhs) : new MathExpression(rhs);
String val = expr.solve();
String referenceName = expr.getReturnObjectName();
System.out.println("rhs: "+rhs+", mathExpClass: "+mathExpClass+", expr.class: "+expr.getClass()+", val: "+val+", type: "+expr.getReturnType());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.out.println("rhs: "+rhs+", mathExpClass: "+mathExpClass+", expr.class: "+expr.getClass()+", val: "+val+", type: "+expr.getReturnType());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah, tracing/verbose mode is a bit missing.


if (Variable.isVariableString(newFuncName) || isVarNamesList) {
Function f;
Expand Down
Loading