On Mon, Apr 16, 2018 at 9:15 PM, Waldek Hebisch <[email protected]> wrote: > AFAICS several patches make code more complicated, I am not > shure if we want such changes.
Yes, some patches make code longer, but not necessarily more complicated. I use the most natural algorithm according to FR's Rep: most functions takes 2 sorted list as arguments, then the function body loops over them, doing computations (on exponents and flags) and deduplicating items with same factors. You will see that after my patches, 'exquo', '=', 'gcd', '*' all have similar structures. Also, this explicit loop is required to achieve O(N) complexity instead of O(N*log(N)) or worse. > In particular, while in > Factored exponents should be nonnegative it make perfect > mathematical sense to also have negative exponents. Factored objects with negative exponents would be a Field, so it should be a different Domain. Currently all usage of FR implies that exponents are positive. > To make things more clean we could have a separete domain > allowing negative exponents and Factored could inherit > from this domain most of its operations. That just a thought, > but it seems that disallowing negative exponents in > implementations leads to more complicated code. We can add such domain when the need comes. > Also changing recursion to loops seem to complicated code. > > -- > Waldek Hebisch Can I merge all these patches? I would prefer to merge them each as a individual patch. -- 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.
