Ralf Hemmecke wrote:
> 
> On 05/26/2016 02:44 PM, Waldek Hebisch wrote:
> > oldk1331 wrote:
> >>
> >>> I'm not sure if this patch creates unnecessary parenthesis elsewhere.
> >>
> >> One change I noticed is "unparse(( t-1 )::INFORM)", it used to be
> >> "t+-1", after patch it's "t+(-1)", is it a bug that it doesn't return 
> >> "t-1"?
> > 
> > That is a tricky question.  InputForm (and OutputForm) are supposed
> > to work for all domains.  In abelian semigroup containing symbols
> > and integers 't + -1' makes sense, but 't-1' is undefined:
> > we can add integer '-1' to symbol 't', but there is no way to
> > subtract.  In principle all nontrivial transformations should be
> > done in domains (where we have axioms like associativity, etc.).
> 
> I still don't see why 't + -1' makes sense. I would always want this as
> "t+(-1)".

FriCAS parser parses 't + -1' the same as 't+(-1)', so both results
are equivalent from point of view of 'unparse'.

-- 
                              Waldek Hebisch

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
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