Discussion:
[fricas-devel] friCAS API: weird eval signature?
Riccardo GUIDA
2018-09-17 16:41:02 UTC
Permalink
Hi to all. This is mainly for Ralf.

In
http://fricas.github.io/api/FunctionSpace.html#l-function-space
I read:
eval: (%, List Symbol, List NonNegativeInteger, List List % -> %) -> % if R has Ring
eval(x, [s1, ..., sm], [n1, ..., nm], [f1, ..., fm])
replaces every si(a1, ..., an)^ni in x by fi(a1, ..., an) for any a1, …, am.

Now, if function application without parentheses is right associating (ie 'f g x = f(g(x)')
I parse
List List % -> %
above as
( List (List %) ) -> %
or
List( List (% -> %) )
depending on the binding strength of '->'.
(Guess is the former case, ie '->' is weaker than function application.)

But in
https://github.com/hemmecke/fricas/blob/master-hemmecke/src/algebra/fspace.spad#L494
I see:
eval : (%, List SY, List N, List(List % -> %)) -> %
++ eval(x, [s1, ..., sm], [n1, ..., nm], [f1, ..., fm]) replaces
++ every \spad{si(a1, ..., an)^ni} in x by \spad{fi(a1, ..., an)}
++ for any a1, ..., am.

which seems to suggest that the correct parsing is different from the previous two, ie:
List( List(%) -> % )

Am I missing something or there is a real problem?

Riccardo
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
oldk1331
2018-09-18 05:09:01 UTC
Permalink
Yes, I agree that there are parenthesis missing in FriCAS API
(fricas.github.io/api).
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Ralf Hemmecke
2018-09-18 05:31:41 UTC
Permalink
Thank you, Riccardo,

yes, that must be a bug in my api.spad. I'll try to take care of it in
the next release.

Ralf
Post by oldk1331
Yes, I agree that there are parenthesis missing in FriCAS API
(fricas.github.io/api).
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...