From f35bdc3768d1dc07ad854227c59789bb825b3d83 Mon Sep 17 00:00:00 2001 From: fd7794 Date: Tue, 6 Feb 2024 13:14:45 +0100 Subject: [PATCH] added if case for 'x' in function for difference_of_simplified_exponential_functions --- src/main/py/read_math_function.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/py/read_math_function.py b/src/main/py/read_math_function.py index ecbd18e..d695a46 100644 --- a/src/main/py/read_math_function.py +++ b/src/main/py/read_math_function.py @@ -127,4 +127,7 @@ def difference_of_simplified_exponential_functions(type, function): return False minuend, subtrahend = function.split('-') new_minuend = simplify_exponential_function('e', minuend) - new_subtrahend = simplify_exponential_function('e', subtrahend) \ No newline at end of file + new_subtrahend = simplify_exponential_function('e', subtrahend) + if new_minuend != "Der Ausdruck muss die Variable 'x' enthalten." and new_subtrahend != "Der Ausdruck muss die Variable 'x' enthalten.": + simplified = new_minuend - new_subtrahend + return simplified \ No newline at end of file