fix #10326 issue interval(-oo,oo) contains oo
fix #10326 issue interval(-oo,oo) contains oo

Move infinities check to other_is_real

sampadsaha5/sympy,madan96/sympy,Curious72/sympy,skidzo/sympy,madan96/sympy,Titan-C/sympy,kaichogami/sympy,Arafatk/sympy,jaimahajan1997/sympy,oliverlee/sympy,mafiya69/sympy,mafiya69/sympy,postvakje/sympy,hargup/sympy,skidzo/sympy,rahuldan/sympy,chaffra/sympy,drufat/sympy,drufat/sympy,drufat/sympy,madan96/sympy,jerli/sympy,lindsayad/sympy,mafiya69/sympy,lindsayad/sympy,hargup/sympy,ChristinaZografou/sympy,yashsharan/sympy,ChristinaZografou/sympy,aktech/sympy,skidzo/sympy,yashsharan/sympy,kaushik94/sympy,jaimahajan1997/sympy,Curious72/sympy,ChristinaZografou/sympy,Arafatk/sympy,oliverlee/sympy,chaffra/sympy,Titan-C/sympy,postvakje/sympy,sampadsaha5/sympy,aktech/sympy,Shaswat27/sympy,kaushik94/sympy,Arafatk/sympy,Shaswat27/sympy,Curious72/sympy,rahuldan/sympy,lindsayad/sympy,kaichogami/sympy,kaushik94/sympy,jerli/sympy,aktech/sympy,Titan-C/sympy,chaffra/sympy,souravsingh/sympy,oliverlee/sympy,yashsharan/sympy,Shaswat27/sympy,kaichogami/sympy,rahuldan/sympy,sampadsaha5/sympy,jaimahajan1997/sympy,jerli/sympy,souravsingh/sympy,souravsingh/sympy,hargup/sympy,postvakje/sympy