What is ALGOP '%alg?

8 views
Skip to first unread message

Qian Yun

unread,
Dec 16, 2023, 4:34:14 AM12/16/23
to fricas-devel
Seems that ALGOP, macro for '%alg, is not used anywhere in the
code base?

On the other hand, "opalg" is often defined as operator('rootOf).

- Qian

Waldek Hebisch

unread,
Dec 16, 2023, 7:11:54 AM12/16/23
to fricas...@googlegroups.com
On Sat, Dec 16, 2023 at 05:34:10PM +0800, Qian Yun wrote:
> Seems that ALGOP, macro for '%alg, is not used anywhere in the
> code base?

Simple search shows that it is used quite a lot.

> On the other hand, "opalg" is often defined as operator('rootOf).

ALGOP catches both 'rootOf' and 'nthRoot' so there is significant
difference.

--
Waldek Hebisch

Qian Yun

unread,
Dec 16, 2023, 7:21:46 AM12/16/23
to fricas...@googlegroups.com
Oh, I missed this line:

for op in algop repeat assert(op, ALGOP) -- algop is [oproot, opalg]

So "has?(operator k, ALGOP)" is a shortcut for
"is?(operator k, 'nthRoot) or is?(operator k, 'rootOf)".

I was under the impression that there's an operator named "%alg",
turns out this is a property, not a name.

- Qian
Reply all
Reply to author
Forward
0 new messages