#30618·sympy

Extended real numbers should be not closed under addition or multiplication

Author: TiloRCCreated Sep 29, 2026Updated Sep 29, 2026
LabelsWrong Resultassumptions
python
>>> x, y = symbols('x y')
>>> ask(Q.extended_real(x + y), Q.extended_real(x) & Q.extended_real(y))   # True
True
>>> ask(Q.extended_real(x * y), Q.extended_real(x) & Q.extended_real(y))   # True
True

If x=oo and y=-oo then x+y is nan. Similarly, if x=0 and y=oo then x*y is nan.