From 1e3619ed413f170c563a10400ffb0a233a62a279 Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 16 Apr 2024 14:52:31 +0200 Subject: [PATCH] test: using more reliable function to compute y --- tests/utils/simulation_int_many.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/utils/simulation_int_many.py b/tests/utils/simulation_int_many.py index 1d09967a..36141857 100644 --- a/tests/utils/simulation_int_many.py +++ b/tests/utils/simulation_int_many.py @@ -7,6 +7,13 @@ def get_y_n2_dec(ANN, gamma, x, D, i): + """ + Analytical solution to obtain the value of y + Equivalent to get_y in the math smart contract, + except that it doesn't fallback to newton_y. + This function is a draft and should not be used + as expected value for y in testing. + """ if i == 0: m = 1 @@ -174,8 +181,7 @@ def newton_y(A, gamma, x, D, i): def solve_x(A, gamma, x, D, i): - return int(get_y_n2_dec(A, gamma, x, D, i)[0] * 10**18) - # return newton_y(A, gamma, x, D, i) + return newton_y(A, gamma, x, D, i) def solve_D(A, gamma, x):