According to

https://github.com/fricas/fricas/blob/master/src/algebra/variable.spad#L58

the argument f is a symbol. I think that the output function is not perfect.

  coerce(r : %) : OutputForm == outputMapTran(f, r)$Lisp

It leads to

%%% (409) -> function(sin(x*y), 'g, 'x, 'y)

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

(411)  f
                                          Type: Symbol
%%% (412) -> f

(412)  f x == sin(x)
                               Type: FunctionCalled(f)

%(409)  g
                                          Type: Symbol
%%% (410) -> g

(410)  g (x, y) == sin(x y)
                               Type: FunctionCalled(g)

What is OK for one argument (without parentheses), is not OK for two arguments. There is a space between g and the open (. Of course, since the OutputForm is wrong neither i-output.boo not the TeXFormat get it right. TeX output looks like

g \  {\left( x, \: y \right)}\  == \  {\cos \left({{y+x}} \right)}

But there are also cases like this:

%%% (468) -> )clear prop g
%%% (468) -> g(n|n>1 and odd? n, t | t > 9) == tanh n + t
%%% (469) -> g

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

whose corresponding OutputForm is this:
(CONCATB  g
 (PAREN (| (PAREN (AGGLST n t)) (and (and (> n 1) (odd? n)) (> t 9))))
  ==  (+ (tanh n) t))

I guess, the definition of outputMapTran would have to be changed to really produce just (f x) or (g x y) for the function application side (left-hand side) in case that there is no conditional part.

I leave that to someone else.

Ralf

--
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/def35e86-ff5d-4703-b4d7-8fc67a223311%40hemmecke.org.

Reply via email to