I am having some trouble using the diff
command. If run Cadabra2 REPL with cadabra2
it works just fine:
> ex:= A*A + B + C;
A A + B + C
> diff(ex, $A$);
2*A
Same with the GTK GUI. I would expect it to do the same if I put my commands into a .cdb
file and ran cadabra2 file.cdb
. File contents are
ex:= A*A + B + C;
diff(ex, $A$);
so exactly the same thing, but diff
just spits the original expression back at me instead:
$ cadabra2 file.cdb
A A + B + C
A A + B + C
It seems to just echo the last expression before the diff command; if I put some other expression in between the two,
ex:= A*A + B + C;
foo:= B;
diff(ex, $A$);
the output is
$ cadabra2 file.cdb
A A + B + C
B
B
Surely this is not intentional?