We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddc1058 commit ac90160Copy full SHA for ac90160
src/main.py
@@ -76,6 +76,12 @@ def plot_function(self):
76
self.show_error_message("Min value must be less than Max value.")
77
return
78
79
+ if ("log10" in function or "sqrt" in function) and min_x < 0:
80
+ self.show_error_message(
81
+ "Min value must be non-negative for functions with log10 or sqrt."
82
+ )
83
+ return
84
+
85
x = np.linspace(min_x, max_x, 400)
86
try:
87
y = eval(self.prepare_function(function, x))
0 commit comments