This patch fix cases like (missing space between 'x' and 'f'):
(1) -> f:=operator 'f; x*D(f x,x)
,
(1) xf (x)
I have compared src/input/*output before and after this patch,
no unexpected breakage.
diff --git a/ChangeLog b/ChangeLog
index fad1db84..60132358 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-09 Qian Yun <[email protected]>
+
+ * src/interp/i-output.boot: add space before derivative
+ in output
+
2019-02-25 Ralf Hemmecke <[email protected]>
* src/algebra/array2.spad: add hashUpdate! to
diff --git a/src/input/i_bugs.input b/src/input/i_bugs.input
index 931c54b2..d577aacd 100644
--- a/src/input/i_bugs.input
+++ b/src/input/i_bugs.input
@@ -291,3 +291,8 @@
xk(s: String): Integer == integer(parse(s)@InputForm)
xk("1");
+
+-- space before derivative
+f := operator 'f;
+x*D(f x, x)
+D(f(x, y^2), [x, y])
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index b12533f5..2adeba9b 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -490,6 +490,8 @@
wasSimple =>
atom cur or keyp cur="SUB" or keyp cur = "OVERBAR" or op="**" or
op = "^" or (atom op and not NUMBERP op and not GETL(op,"APP"))
+ -- deal with cases like "x*f'(x)"
+ or (keyp op = "PRIME" or keyp op = "SUB")
isQuotient op ==
op="/" or op="OVER"
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/CAGBJN93WrZ0xZ5ukd%2BX8Gi3TR_D94fDR_TQ8p3HOWxGfT6doYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.