Hi Waldek,

Your patch gives good visual results, but I do not think that it is logically right.

%%% (156) -> h := operator 'h

   (1)  h
%%% (2) -> (h(x)::OutputForm pretend SExpression)

   (2)  (h x)

%%% (3) -> function(sin x, 'f, 'x)

   (3)  f

%%% (4) -> f :: OutputForm pretend SExpression

   (4)  (CONCATB (CONCAT f (PAREN x)) == (sin x))

I would rather have thought that

  (CONCATB (f x) == (sin x))

would be a logically better OutputForm, don't you think?
Similar for more parameters. Only the cases where there is a condition must be explicitly be done with PAREN.

In fact, one could also argue that

  g(n, t) | (n > 1 and odd?(n) and t > 9) == tanh(n) + t

would be a "valid" outcome. I wouldn't, however, suggest it, since
FriCAS allows foo(x | x>0) as input when defining functions, so I am fine if the conditional case is shown as it is now.

With the definition

flx x ==> lines(format(format(x::OutputForm)$Formatter(FormatLaTeX)))

we get

(5) -> flx f

["\SYMBOL{f}\PAREN{\SYMBOL{x}}\ \SYMBOL{==}\ \FUNCTION{\sin}{\SYMBOL{x}}"]

In other words, the OutputForm cannot be recognized as function, because it declares itself just as the juxtaposition of a symbol and a parenthesized symbol and not as a function, as it could/should be.

Ralf

On 7/3/24 16:45, hebisch wrote:
   Branch: refs/heads/master
   Home:   https://github.com/fricas/fricas
   Commit: eec2f4bf0c5ca391f454e651be4ee2f0f06512b0
       
https://github.com/fricas/fricas/commit/eec2f4bf0c5ca391f454e651be4ee2f0f06512b0
   Author: Waldek Hebisch <c...@fricas.org>
   Date:   2024-07-03 (Wed, 03 Jul 2024)

   Changed paths:
     M ChangeLog
     M src/interp/i-output.boot

   Log Message:
   -----------
   Put no space between function name and arguments

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/045b2be8-fcd4-4732-8a66-edce1993f397%40hemmecke.org.

Reply via email to