|
|
@@ -12,7 +12,7 @@ def clamp(x):
|
|
12
|
12
|
def kappa(formula, x):
|
|
13
|
13
|
func_dict = {fn: eval(f'lambda *args: mpmath.{fn}(*args)') for fn in dir(mpmath)}
|
|
14
|
14
|
return float(eval(formula, {'x': x, 'clamp': clamp, **func_dict}))
|
|
15
|
|
-def plot(formula='(1 - cos(((4)/2)*x))/2', RANGE_FROM=0, RANGE_TO=4*pi, N=10):
|
|
|
15
|
+def plot(formula='(1 - cos(((4)/2)*x))/2', RANGE_FROM=0, RANGE_TO=4*pi, N=8):
|
|
16
|
16
|
num_points = 1+2**N
|
|
17
|
17
|
|
|
18
|
18
|
# Generate x values with the specified number of points
|