From: Stavros M. <mac...@gm...> - 2024-12-27 14:48:38
|
Maybe define another value of *factorflag*? On Fri, Dec 27, 2024, 09:08 Barton Willis via Maxima-discuss < max...@li...> wrote: > This morning, integerp(factor(-2)) = false tripped me up. I traced > integerp and that appeared normal. Of course, the problem is that > internally factor(-2) is the unsimplified expression > ((MTIMES SIMP FACTORED) -1 2). > > My code was doing [αα,aa,bb,ff] : map('factor, subst(sol, [α,a,b,f])). In > my testing, α was rarely a composite integer (or negative), so the bug > in my code showed infrequently. > > Other than using featurep(X,'integer) or doing a post factor call to > expand(X,0,0), do we have a workaround? > > > --Barton > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |