Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes a few grammatical errors #1585

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/secp256k1_ellswift.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern "C" {
*
* If the Y coordinate is relevant, it is given the same parity as t.
*
* Changes w.r.t. the the paper:
* Changes w.r.t. the paper:
* - The u=0, t=0, and u^3+t^2+7=0 conditions result in decoding to the point
* at infinity in the paper. Here they are remapped to finite points.
* - The paper uses an additional encoding bit for the parity of y. Here the
Expand Down
2 changes: 1 addition & 1 deletion src/modinv32_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void secp256k1_modinv32_normalize_30(secp256k1_modinv32_signed30 *r, int3
/* In a first step, add the modulus if the input is negative, and then negate if requested.
* This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input
* limbs are in range (-2^30,2^30), this cannot overflow an int32_t. Note that the right
* shifts below are signed sign-extending shifts (see assumptions.h for tests that that is
* shifts below are signed sign-extending shifts (see assumptions.h for tests that verify that is
* indeed the behavior of the right shift operator). */
Comment on lines 82 to 84
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a native speaker, but the current version seems easier to parse. Maybe "... for tests that this is indeed ...".

Copy link
Contributor

@real-or-random real-or-random Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK on this change. I think the current version on master is perfectly fine and readable, and so there's no reason to bother with it. Neither your first suggestion nor your updated suggestion seems natural to me. I feel that "that" should not be omitted here. If your grammar checker complains about a repeated word, then that's a false positive. (And I don't think Jonas' suggestion is an improvement either.)

cond_add = r8 >> 31;
r0 += modinfo->modulus.v[0] & cond_add;
Expand Down
2 changes: 1 addition & 1 deletion src/modinv64_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int6
/* In a first step, add the modulus if the input is negative, and then negate if requested.
* This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input
* limbs are in range (-2^62,2^62), this cannot overflow an int64_t. Note that the right
* shifts below are signed sign-extending shifts (see assumptions.h for tests that that is
* shifts below are signed sign-extending shifts (see assumptions.h for tests that verify that is
* indeed the behavior of the right shift operator). */
cond_add = r4 >> 63;
r0 += modinfo->modulus.v[0] & cond_add;
Expand Down