On Fri, Mar 23, 2018 at 11:58 PM, Ralf Hemmecke <[email protected]> wrote: > Thank you, Qian, > > I wonder, how the origininal code can ever have worked. > > Furthermore, we can avoid > > nniToI st == delay > empty? st => empty() > term : Term := [(frst st).k, (frst st).c] > concat(term, nniToI rst st) > > altogether. It is similar to > > coerce(uts : SUTS) == uts pretend % (*) > > https://github.com/fricas/fricas/blob/master/src/algebra/sups.spad#L1512 > > in SparseUnivariateLaurentSeries. The current code looks as if the > programmers couldn't decide whether it's safe to say (n pretend Integer) > instead of (n::Integer). Se either > > (A) we allow (*) ... and then mark such places such that if ever > NNI and Integer don't share the same representation, these places > can be found easily, or > (B) forbid such (potentially) dangerous "pretend"s. > > I'm somewhat in favour of (A) (restricted to NNI <--> PI <--> INT). > > Ralf
I agree with (A). The InnerSparseUnivariatePowerSeries is the representation Domain for both Taylor and Laurent series, so it accepts Integer (instead of NNI) as exponent. So it is safe to use 'prentend' to replace 'nniToI'. You should make a patch for 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
