Commit b702461
committed
tests: improve fe_sqr test
Currently the `run_sqr` test doesn't do anything with the
result of the `fe_sqr` call. Improve that by checking that
the equation `(x+y)*(x-y) = x^2 - y^2` holds for some random
values y, as suggested in issue bitcoin-core#1471 by real-or-random.
The existing loop for generating the x values is kept as-is.1 parent 0653a25 commit b702461
1 file changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3285 | 3285 | | |
3286 | 3286 | | |
3287 | 3287 | | |
3288 | | - | |
| 3288 | + | |
| 3289 | + | |
3289 | 3290 | | |
3290 | | - | |
3291 | | - | |
3292 | | - | |
3293 | | - | |
| 3291 | + | |
| 3292 | + | |
3294 | 3293 | | |
3295 | | - | |
3296 | | - | |
3297 | | - | |
3298 | | - | |
3299 | | - | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
3300 | 3313 | | |
3301 | 3314 | | |
3302 | 3315 | | |
| |||
0 commit comments