Skip to content

[Diffie Hellman] Add description that a**b means "a raised to the power of b"? #1932

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

Closed
Gautzilla opened this issue Jan 28, 2022 · 7 comments · Fixed by #1933
Closed

[Diffie Hellman] Add description that a**b means "a raised to the power of b"? #1932

Gautzilla opened this issue Jan 28, 2022 · 7 comments · Fixed by #1933

Comments

@Gautzilla
Copy link
Contributor

Gautzilla commented Jan 28, 2022

Hey,
I had some trouble with the Diffie Hellman exercise because of the instruction:

A = g**a mod p

Where g**a represents g raised to the power of a.

I thought it was basically a a*b and then struggled correcting my code. Not having a CS background, I was only used to the a^b notation.

Wouldn't it be useful to add a comment specifying that a**b means a^b or a raised to the power of b?

@Gautzilla Gautzilla changed the title [Diffie Hellman] Add description that a**b means a to the power of b? [Diffie Hellman] Add description that a**b means a raised to the power of b? Jan 28, 2022
@Gautzilla Gautzilla changed the title [Diffie Hellman] Add description that a**b means a raised to the power of b? [Diffie Hellman] Add description that a**b means "a raised to the power of b"? Jan 28, 2022
@SaschaMann
Copy link
Contributor

SaschaMann commented Jan 28, 2022

Imo we should just change it to ^ or aᵇ in line with other exercises. Preferably the latter.

@ErikSchierboom
Copy link
Member

Agreed. I found the ** unintuitive too.

@SaschaMann
Copy link
Contributor

@Gautzilla do you want to open a PR that changes it?

@Gautzilla
Copy link
Contributor Author

@Gautzilla do you want to open a PR that changes it?

Yes, I'll do that! (I'm still learning to use git, I hope I'll do it right!)

@ErikSchierboom
Copy link
Member

@Gautzilla We have some useful links on how to create PRs here: https://exercism.org/docs/building

@Gautzilla
Copy link
Contributor Author

@Gautzilla We have some useful links on how to create PRs here: https://exercism.org/docs/building

Thank you, I was reading all that!
I'm learning so much different things here it's insane. Thanks for making all this possible! ;)

@Gautzilla
Copy link
Contributor Author

#1933

I created a PR addressing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants