You have to watch out for +/-oo otherwise you might generate a nan after substitution, e.g. x + abs(x) < 3 has the solution (-oo, 3/2) but the average is -oo and substitution gives a nan. So you have to be smarter about this test, maybe:

```
if start == -oo and end == oo:
    test = 0
elif start == -oo:
    test = end - 1
elif end == oo:
    test = start + 1
else:
    test = (start + end)/2
```

Btw, solve stumbles on this equation and `reduce_inequalities` doesn't like `(x + abs(x) < 3, assume=Q.real(x))` so the changes you are making are needed, they should just be incorporated somehow into the solve and perhaps other inequalities solvers.

Also, if the input is True (e..g. `var('x', real=True); isolve(x**2+1>0,x)` then `(-oo, oo)` should be returned; if the input is False then the empty set should be returned.