Skip to content

Commit

Permalink
https://github.com/crowlogic/arb4j/issues/253
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlogic committed Dec 9, 2024
1 parent 7860fcc commit 84f6dec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
f

var f = RealFunction.express("(√(π)*Γ(3/4)*J(1/4, |s|)*2^(1/4)/|s|^(1/4))");
plot(-10,40,2000,f);
f.eval(-2.3);
plot(-10,40,2000,f);
var f = RealFunction.express("(√(π)*Γ(3/4)*J(1/4, abs(s))*2^(1/4)/abs(s)^(1/4))");
plot(-10,40,2000,f);
8 changes: 8 additions & 0 deletions src/main/java/arb/expressions/nodes/DerivativeNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ public class DerivativeNode<D, R, F extends Function<? extends D, ? extends R>>
Node<D, R, F>
{

@Override
public Node<D, R, F> simplify()
{
derivative.isResult = isResult;
return derivative;
}

@Override
public String toString()
{
Expand Down Expand Up @@ -132,6 +139,7 @@ public boolean isLeaf()
public MethodVisitor generate(MethodVisitor mv, Class<?> resultType)
{
assert !resultType.equals(Object.class) : "Objects shan't be generated";
derivative.isResult = isResult;
return derivative.generate(mv, resultType);
}

Expand Down

0 comments on commit 84f6dec

Please sign in to comment.