The patch is flawed: it doesn't fix 'timesWidth'.

This new patch fixes that, and removes 'isRationalNumber',
you may want to split it into 2 commits.

--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -373,7 +373,7 @@
       d:= APP(opString,x,y,d)
       x:= x + #opString
     [d,x]:= appInfixArg(arg,x,y,d,rightPrec,"left",nil) --app in a right arg
-    wasSimple:= atom arg and not NUMBERP arg or isRationalNumber arg
+    wasSimple:= atom arg and not NUMBERP arg
     wasQuotient:= isQuotient op
     wasNumber:= NUMBERP arg
     lastOp := op
@@ -391,7 +391,7 @@
       w:= w + #opString
     if infixArgNeedsParens(arg, rightPrec, "left") then w:= w+2
     w:= w+WIDTH arg
-    wasSimple:= atom arg and not NUMBERP arg --or isRationalNumber arg
+    wasSimple:= atom arg and not NUMBERP arg
     wasQuotient:= isQuotient op
     wasNumber:= NUMBERP arg
     firstTime:= nil
@@ -408,7 +408,7 @@
       d:= APP(BLANK,x,y,d)
       x:= x+1
     [d,x]:= appInfixArg(arg,x,y,d,rightPrec,"left",nil) --app in a right arg
-    wasSimple:= atom arg and not NUMBERP arg or isRationalNumber arg
+    wasSimple:= atom arg and not NUMBERP arg or keyp arg = "OVERBAR"
     wasQuotient:= isQuotient op
     wasNumber:= NUMBERP arg
     lastOp := op
@@ -503,7 +503,7 @@
 needStar(wasSimple,wasQuotient,wasNumber,cur,op) ==
   wasNumber or wasQuotient or isQuotient op => true
   wasSimple =>
-    atom cur or keyp cur="SUB" or isRationalNumber cur or op="**" or
+    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"))

 isQuotient op ==
@@ -521,7 +521,7 @@
       w:= w+1
     if infixArgNeedsParens(arg, rightPrec, "left") then w:= w+2
     w:= w+WIDTH arg
-    wasSimple:= atom arg and not NUMBERP arg --or isRationalNumber arg
+    wasSimple:= atom arg and not NUMBERP arg or keyp arg = "OVERBAR"
     wasQuotient:= isQuotient op
     wasNumber:= NUMBERP arg
     lastOp := op
@@ -776,8 +776,6 @@
     d := APP(c,x,y,d)
   d

-isRationalNumber x == nil
-
 widthSC u == 10000

 --% The over-large matrix package

-- 
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].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to