Changes
1 changed files (+6/-6)
-
-
@@ -27,11 +27,12 @@ def nl(line, testing=False):return res nl_tests = [ ("solve x^2 = 2", [x == -sqrt(2), x == sqrt(2)]), ("is 42069 prime", False), (r"take \begin{bmatrix}\frac{9}{10} & \frac{1}{10}\\\frac{3}{10} & \frac{7}{10}\end{bmatrix} to the power of 10 and get the answer as a decimal", matrix([[0.751511654400000, 0.248488345600000], [0.745465036800000, 0.254534963200000]])), ("Determinant of the 4x4 matrix with 0s on the diagonal and 1s off diagonal", -3), ("Solve x^2 = 2", [x == -sqrt(2), x == sqrt(2)]), ("Is 42069 prime", False), (r"Take \begin{bmatrix}\frac{9}{10} & \frac{1}{10}\\\frac{3}{10} & \frac{7}{10}\end{bmatrix} to the power of 10 and get the answer as a decimal", matrix([[0.751511654400000, 0.248488345600000], [0.745465036800000, 0.254534963200000]])), (r"\frac{1^3e^{-1}}{3!}\frac{(1/2)^0e^{-1/2}}{0!}\frac{(1/2)^0e^{-1/2}}{0!}", e^(-2)/6), ("find the minimum of x^x on 0 to 10", (0.6922006275553464, 0.3678794331853406)), ("Find the minimum of x^x on 0 to 10", (0.6922006275553464, 0.3678794331853406)), ] def run_nl_tests():
-
@@ -40,8 +41,7 @@ def run_nl_tests():for line, ans in nl_tests: print(line) for _ in range(5): if ans != nl(line, True): passes += 1 passes += ans == nl(line, True) total = len(nl_tests) * 5. print(passes / total) print((time() - start_time) / total)
-