>
> BTW2: Alternatively to leaving them undefined we could 
> define them like this: 
>
> leadingTerm(s) == error "Do not use leadingTerm for series" 
>
> or maybe: 
>
> leadingTerm(s) == error "leadingTerm: not supported for series" 
>
> This is generic implementation that could be added to appropriate 
> category.
>

I see the issues. As a new user I also stumbled upon the caveats that lazy 
infinite series bring. But
when you're aware of these issues, these functions can still be useful, 
after taking the necessary precautions.
I agree that there should be consistency and I see some possibilities to 
address that:

1. Have all functions that are not guaranteed to terminate throw an error 
(your BTW2). This means
if users want to have such functionality, they will have to implement it 
themselves.

2. Implement everything, and put big fat warnings in the documentation for 
these functions.

3. Implement some helper package/domain that implements these functions? Or 
force users to set some flag
so that they can use these functions "set this flag if you know what you 
do".

After some thought I'd probably go for option 2.
I don't know if there is some example for this in the manual, but one could 
just have some section
about this in the manual, where the non-terminating functions are listed, 
and have an example that
they are easily generated, for example like: order(series(exp(x),x=0) - 
series(exp(x),x=0))

I think also the web API could be improved. For example when I started 
using FriCAS I didn't realize that 
a lot of functions have descriptions, but only when it track them back to 
the category where
they are defined. So 
on https://fricas.github.io/api/UnivariatePuiseuxSeries.html you don't see 
that
order can run into problems, only 
on https://fricas.github.io/api/UnivariatePowerSeriesCategory.html
Other functions like leadingMonomial don't have such warnings at all.

I very much would like to have/keep these functions in some way in the 
official version,
so that I don't have to reimplement them.
I believe that if this was better documented, I would not have had such 
issues. So I'm opting for implementing
everything and improving the documentation together with it.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/57570507-4bee-4eee-aabb-bee92d9e024en%40googlegroups.com.

Reply via email to