Skip to content

Commit

Permalink
public void testDerivativeOfExponentialFunction()
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlogic committed Dec 2, 2024
1 parent 9020d2b commit 7bbfae3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/arb/expressions/nodes/VariableNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,12 @@ else if (ascendentInput)
// assert !returnType.isInterface() : "returnType is " + returnType + " and
// therefore cannot be instantiated";
assert returnType != null : "returnType is null for " + this;
assert returnType != Object.class : "TODO: tried to return "
+ returnType
+ " for "
+ this
+ " which is part of "
+ expression;
// assert returnType != Object.class : "TODO: tried to return "
// + returnType
// + " for "
// + this
// + " which is part of "
// + expression;
return returnType;
}

Expand Down
6 changes: 6 additions & 0 deletions src/test/java/arb/expressions/ExpressionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
public class ExpressionTest extends
TestCase
{
public void testDerivativeOfExponentialFunction()
{
var x = RealFunction.parse("∂exp(x)/∂x");
assertEquals("exp(x)", x.rootNode.toString());
}

public static void testAFractionConstantTimesAFractionConstant()
{
var f = RationalNullaryFunction.parse("½+¼");
Expand Down

0 comments on commit 7bbfae3

Please sign in to comment.