Skip to content

Commit

Permalink
removed pow call and replaced with precomputed constant #133
Browse files Browse the repository at this point in the history
  • Loading branch information
vo-nil committed Feb 26, 2024
1 parent 6f8a465 commit d4c4f20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ namespace nil {
0x00,
0x1ABEF7237D62007BB9B2EDA5AFCB52F9D179F23DBD49B8D1B24CF7C1BF8066791317689172D0F4CB90CF47182B7D7B2_cppui377};

// constexpr static const extended_integral_type group_order_minus_one_half = (pow(base_field_type::modulus, 2)-1)/2;
constexpr static const extended_integral_type group_order_minus_one_half =
0x16983E85DD7FD912B489DD9B0931E25DC5C3ED257749F8FAF38A09EED26AE04E80C57DC833066E00A7389281526B62305555545DB857018C1925CAC31C64EB5E5FDE91AF8E04D256D1347970DEC00399C692A780000008508C00000000000_cppui753;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ namespace nil {
0xB20DCB5704E326A0DD3ECD4F30515275398A41A4E1DC5D347CFBBEDDA71CF82_cppui252,
0xB1FFEFD8885BF22252522C29527D19F05CFC50E9715370AB0F3A6CA462390C_cppui248};

constexpr static const extended_integral_type group_order_minus_one_half = (pow(base_field_type::modulus, 2)-1)/2;
constexpr static const extended_integral_type group_order_minus_one_half =
0x492E25C3B1E5FCE2CCD37BE01A4690E5805C2A88B1BAB031376FD2E1A6359C682344F4ABD09216425280C4E36CB656E5301039684F560809DAA2C5113AEB4D8_cppui507;

/*constexpr static const std::array<non_residue_type, 2> Frobenius_coeffs_c1 =
{non_residue_type(0x00), non_residue_type(0x00)};*/
Expand Down

0 comments on commit d4c4f20

Please sign in to comment.