Skip to content

Commit

Permalink
Fix test_newton_D (it was not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
michwill committed Apr 7, 2024
1 parent 19dcd0a commit ad12b9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unitary/math/test_newton_D.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def inv_target_decimal_n2(A, gamma, x, D):

N_COINS = 2
# MAX_SAMPLES = 1000000 # Increase for fuzzing
MAX_SAMPLES = 300 # Increase for fuzzing
N_CASES = 1
MAX_SAMPLES = 5000 # Increase for fuzzing
N_CASES = 32

A_MUL = 10000
MIN_A = int(N_COINS**N_COINS * A_MUL / 10)
Expand Down Expand Up @@ -171,7 +171,7 @@ def _test_newton_D(
raise # this is a problem

# dy should be positive
if result_get_y < X[j]:
if result_get_y < X[j] and result_get_y / D > MIN_XD / 1e18 and result_get_y / D < MAX_XD / 1e18:

price_scale = (btcScalePrice, ethScalePrice)
y = X[j]
Expand Down

0 comments on commit ad12b9b

Please sign in to comment.