handle with care Pow and rational expressions during simplification
handle with care Pow and rational expressions during simplification

The tests in Wester point out that simplification should
give priority to handling the denominator first and not
allow a term to factor out that would then change a zero
there into a non-zero term. e.g. getting (after simplification)
cos(x)**2 + sin(x)**2 - 1 over the same expression does
not make it 1: it is 0/0, nan.

The same issue exists when simplifying a Pow: the base should
be handled first to see if it becomes 0 else something like the
expr.py doctest, z(x)**(x + 1) where z(x) will simplify to zero
might become zero: z(x)**x*z(x)**1 = z(x)**x*0 = 0. This actually
suggests a problem in Mul.flatten if a zero argument short circuits
to 0 overall without knowing if there is any term for which
its boundedness is not known (since unbounded*0 is nan).

madan96/sympy,kevalds51/sympy,MechCoder/sympy,vipulroxx/sympy,AkademieOlympia/sympy,Shaswat27/sympy,farhaanbukhsh/sympy,mafiya69/sympy,Arafatk/sympy,debugger22/sympy,abloomston/sympy,rahuldan/sympy,skidzo/sympy,jamesblunt/sympy,cccfran/sympy,shipci/sympy,kumarkrishna/sympy,kaushik94/sympy,toolforger/sympy,ga7g08/sympy,wyom/sympy,Davidjohnwilson/sympy,emon10005/sympy,pandeyadarsh/sympy,chaffra/sympy,pbrady/sympy,VaibhavAgarwalVA/sympy,Designist/sympy,moble/sympy,kevalds51/sympy,Shaswat27/sympy,skirpichev/omg,oliverlee/sympy,ahhda/sympy,cswiercz/sympy,sahmed95/sympy,grevutiu-gabriel/sympy,chaffra/sympy,vipulroxx/sympy,Mitchkoens/sympy,Titan-C/sympy,beni55/sympy,debugger22/sympy,sampadsaha5/sympy,Designist/sympy,Vishluck/sympy,jerli/sympy,kumarkrishna/sympy,moble/sympy,cccfran/sympy,pbrady/sympy,jamesblunt/sympy,abloomston/sympy,pandeyadarsh/sympy,shipci/sympy,iamutkarshtiwari/sympy,Curious72/sympy,Gadal/sympy,jerli/sympy,drufat/sympy,farhaanbukhsh/sympy,toolforger/sympy,asm666/sympy,rahuldan/sympy,jamesblunt/sympy,garvitr/sympy,Vishluck/sympy,vipulroxx/sympy,Mitchkoens/sympy,Curious72/sympy,jaimahajan1997/sympy,Davidjohnwilson/sympy,emon10005/sympy,sahmed95/sympy,grevutiu-gabriel/sympy,bukzor/sympy,drufat/sympy,cswiercz/sympy,atreyv/sympy,lindsayad/sympy,postvakje/sympy,aktech/sympy,atsao72/sympy,MechCoder/sympy,postvakje/sympy,saurabhjn76/sympy,drufat/sympy,cccfran/sympy,ChristinaZografou/sympy,kumarkrishna/sympy,Sumith1896/sympy,abhiii5459/sympy,debugger22/sympy,VaibhavAgarwalVA/sympy,meghana1995/sympy,amitjamadagni/sympy,iamutkarshtiwari/sympy,kmacinnis/sympy,Gadal/sympy,bukzor/sympy,sunny94/temp,meghana1995/sympy,yashsharan/sympy,lidavidm/sympy,AunShiLord/sympy,shipci/sympy,beni55/sympy,toolforger/sympy,MridulS/sympy,pbrady/sympy,wanglongqi/sympy,ga7g08/sympy,Vishluck/sympy,lindsayad/sympy,kaichogami/sympy,kaichogami/sympy,emon10005/sympy,Shaswat27/sympy,ga7g08/sympy,ahhda/sympy,amitjamadagni/sympy,jbbskinny/sympy,shikil/sympy,wyom/sympy,jaimahajan1997/sympy,hrashk/sympy,shikil/sympy,ChristinaZografou/sympy,souravsingh/sympy,garvitr/sympy,sunny94/temp,wanglongqi/sympy,maniteja123/sympy,jaimahajan1997/sympy,lidavidm/sympy,Mitchkoens/sympy,dqnykamp/sympy,Curious72/sympy,wyom/sympy,Sumith1896/sympy,sahilshekhawat/sympy,hargup/sympy,madan96/sympy,shikil/sympy,Titan-C/sympy,kmacinnis/sympy,wanglongqi/sympy,jerli/sympy,atsao72/sympy,atsao72/sympy,sahmed95/sympy,asm666/sympy,kmacinnis/sympy,mafiya69/sympy,moble/sympy,oliverlee/sympy,lidavidm/sympy,jbbskinny/sympy,liangjiaxing/sympy,Gadal/sympy,chaffra/sympy,meghana1995/sympy,cswiercz/sympy,AkademieOlympia/sympy,mafiya69/sympy,kaushik94/sympy,Sumith1896/sympy,oliverlee/sympy,liangjiaxing/sympy,yashsharan/sympy,dqnykamp/sympy,iamutkarshtiwari/sympy,liangjiaxing/sympy,AunShiLord/sympy,MridulS/sympy,Designist/sympy,sahilshekhawat/sympy,ChristinaZografou/sympy,yashsharan/sympy,aktech/sympy,sunny94/temp,beni55/sympy,garvitr/sympy,mcdaniel67/sympy,farhaanbukhsh/sympy,abloomston/sympy,Titan-C/sympy,sahilshekhawat/sympy,AunShiLord/sympy,souravsingh/sympy,jbbskinny/sympy,mcdaniel67/sympy,pandeyadarsh/sympy,abhiii5459/sympy,kevalds51/sympy,MechCoder/sympy,kaushik94/sympy,hrashk/sympy,skidzo/sympy,souravsingh/sympy,atreyv/sympy,grevutiu-gabriel/sympy,saurabhjn76/sympy,sampadsaha5/sympy,VaibhavAgarwalVA/sympy,MridulS/sympy,abhiii5459/sympy,rahuldan/sympy,hargup/sympy,sampadsaha5/sympy,Arafatk/sympy,maniteja123/sympy,aktech/sympy,AkademieOlympia/sympy,postvakje/sympy,yukoba/sympy,atreyv/sympy,kaichogami/sympy,diofant/diofant,yukoba/sympy,hrashk/sympy,maniteja123/sympy,mcdaniel67/sympy,asm666/sympy,madan96/sympy,Davidjohnwilson/sympy,Arafatk/sympy,saurabhjn76/sympy,yukoba/sympy,dqnykamp/sympy,bukzor/sympy,lindsayad/sympy,hargup/sympy,skidzo/sympy,ahhda/sympy