Skip to content

Commit

Permalink
multiprecision: test: goldilock -> goldilocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ioxid committed Dec 25, 2024
1 parent a307d82 commit 4c43c68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,10 @@ void run_benchmark(std::string const& name, F && func)
unit = "??";
}

std::cout << std::fixed << std::setprecision(3);
std::cout << name <<
" mean: " << mean << unit << " err: " << (MdAPE*100) <<
"% median: " << median << unit << " stddiv: " << stddiv <<
std::endl;
std::cout << std::fixed << std::setprecision(3) << std::setfill(' ');
std::cout << name << " mean: " << std::setw(7) << mean << unit
<< " err: " << std::setw(7) << (MdAPE * 100) << "% median: " << std::setw(7)
<< median << unit << " stddiv: " << std::setw(7) << stddiv << std::endl;
}

}
Expand Down
9 changes: 5 additions & 4 deletions crypto3/libs/multiprecision/test/big_mod_randomized.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,15 @@ BOOST_DATA_TEST_CASE(

// This one tests 64-bit numbers used in Goldilock fields.
BOOST_DATA_TEST_CASE(
goldilock_montgomery,
(test_dataset<ModularArithmeticSample<montgomery_big_mod_rt<64>>>("goldilock"))) {
goldilocks_montgomery,
(test_dataset<ModularArithmeticSample<montgomery_big_mod_rt<64>>>("goldilocks"))) {
base_operations_test(sample);
}

BOOST_DATA_TEST_CASE(
goldilock, (test_dataset<ModularArithmeticSample<goldilocks_mod, /*fixed_mod=*/true>>(
"goldilock"))) {
goldilocks,
(test_dataset<ModularArithmeticSample<goldilocks_mod, /*fixed_mod=*/true>>(
"goldilocks"))) {
base_operations_test(sample);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4003,7 +4003,7 @@
"a_m_pow_b": "0x212803e8406c4c24a3acfea6165154ecf"
}
],
"goldilock": [
"goldilocks": [
{
"a": "0x112d6",
"b": "0x2200d2870b",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def gen_arg(bits, m, rnd):
params = [
["prime_mod_montgomery_130", 0x314107B9EF725F87FA08F9FDADD4F48BB, 130],
["even_mod_130", 0x314107B9EF725F87FA08F9FDADD4F48BA, 130],
["goldilock", 0xFFFFFFFF00000001, 64],
["goldilocks", 0xFFFFFFFF00000001, 64],
["even_mod_17", 0x1E240, 17],
["montgomery_17", 0x1E241, 17],
]
Expand Down

0 comments on commit 4c43c68

Please sign in to comment.