> 
> We have two implementations of univariate Laurent series. One of them
> fails to compute all terms of degree <= 0 of the Laurent series 0. See
> demonstration below.
> 
> https://github.com/fricas/fricas/blob/master/src/algebra//suls.spad#L117
> 
> Problem seems to be that SULS computes the order of its input and fails
> to match the specification of order(l, 0).
> 
> http://fricas.github.io/api/UnivariatePowerSeriesCategory.html#l-univariate-power-series-category-order
> 
>  order : % -> Expon
>     ++ \spad{order(f)} is the degree of the lowest order non-zero
>     ++ term in f.
>     ++ This will result in an infinite loop if f has no non-zero terms.
> order : (%, Expon) -> Expon
>     ++ \spad{order(f, n) = min(m, n)}, where m is the degree of the
>     ++ lowest order non-zero term in f.
> 
> Well, perhaps even the documentation is bad, since it is not really
> clear whether for f=0 and n=0, m is infinity and min(infinity, 0) is
> supposed to be 0, i.e. whether min refers to an implemented function min
> or to the (mathematical) min used in Z\cup\{\infty\}.

I think this is reasonably clear, in particular when you compare
the two definitions: the second version is supposed to finish
computation once it is clear that there are no nonzero terms of
order smaller than n (which agrees with mathematical definition
using min in Z\cup\{\infty\}).

> 
> IMHO, the implementation of iOrder is wrong.
> 
> https://github.com/fricas/fricas/blob/master/src/algebra//sups.spad#L284
> 
> Shouldn't it rather be something like this?
> 
>     iOrder(st, n, refer) ==
>       explicitlyEmpty? st => n
>       ...

Yes, this is place to change, but the fix I commited needs
a second line.

-- 
                              Waldek Hebisch
[email protected] 

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to