Extended real numbers should be not closed under addition or multiplication
Author: TiloRCCreated Sep 29, 2026Updated Sep 29, 2026
LabelsWrong Resultassumptions
>>> 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
TrueIf x=oo and y=-oo then x+y is nan. Similarly, if x=0 and y=oo then x*y is nan.
Source: sympy/sympy