|
@ -53,6 +53,7 @@ def simplify_easy_math_function(type, function): |
|
|
if is_string(function) == False or is_allowed_string("c", function) == True: |
|
|
if is_string(function) == False or is_allowed_string("c", function) == True: |
|
|
return simplify_constant("c", function) |
|
|
return simplify_constant("c", function) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def extract_constant(function): |
|
|
def extract_constant(function): |
|
|
coefficient, constant = function.split('x', 1) if 'x' in function else (function, '') |
|
|
coefficient, constant = function.split('x', 1) if 'x' in function else (function, '') |
|
|
constant = constant.lstrip('+') |
|
|
constant = constant.lstrip('+') |
|
|