from math import *

def solve(strEquation, strQuantity='x', start=-100, end=100, dxdigits=1, digits=15):
    solutions = []
    oneSolution = None
    innerStart = start
    while(True):
        oneSolution = findSolution(strEquation, strQuantity, innerStart, end, dxdigits, digits)
        if(oneSolution==None):
            break
        else:
            solutions += [round(oneSolution, digits-1)]
            innerStart = oneSolution + 10.0 ** -dxdigits
    return solutions

def findSolution(strEquation, strQuantity, start, end, dxdigits=1, digits=15):
    x = start
    dx = 10.0 ** -dxdigits
    yPassed = None
    if(strEquation.find("=") != -1):
        strEquation = strEquation.replace("=","-(") + ")"
    if dx % (10.0 ** -digits) == dx:
        return (start + end) / 2 #if digits is too detail, then return value
    while(x >= start and x <= end+dx):
        #execute equation
        exec strQuantity + "=x"
        exec "y = " + strEquation
        if (y > (-10 ** -digits) and y < (10 ** -digits)):
            return x
        #if yPassed is defined
        if(yPassed != None) and ((yPassed>0 and y<0) or (yPassed<0 and y>0)):
            #check y equals 0 and check which the point is passed x-axis or not
            return findSolution(strEquation, strQuantity, x-dx, x, dxdigits+1)
        x += dx
        yPassed = y
    return None
