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

new exercise: complex-numbers #149

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Conversation

atk
Copy link
Contributor

@atk atk commented Feb 19, 2025

Copy link

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

Copy link

Hello 👋 Thanks for your PR.

This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.

If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.

Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum.

(cc @exercism/cross-track-maintainers)

@github-actions github-actions bot closed this Feb 19, 2025
config.json Outdated
"uuid": "5591f4e1-6f72-415e-a789-12eebd712f9a",
"practices": [],
"prerequisites": [],
"difficulty": 4
Copy link
Contributor

@keiravillekode keiravillekode Feb 19, 2025

Choose a reason for hiding this comment

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

We might increase the difficulty to hard (8..10). We are asking students to implement exp/sim/cos, so this has a different level of difficulty compared to most tracks where these are simple library calls.

I used difficulty 9 for x86 meetup for similar reasons.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or perhaps difficulty 7 as you have given hints (Taylor series, number of terms) and students don't need to research how to compute the functions sufficiently accurately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think 8 is a good compromise. Efficiently implementing a Taylor series with changing signs is still a bit of a feat, even if you get the information.

@keiravillekode keiravillekode merged commit 6888e69 into exercism:main Feb 20, 2025
2 checks passed
@atk atk deleted the complex-numbers branch February 20, 2025 05:11
const expected = new ComplexNumber(0, -5);
const actual = new ComplexNumber(0, 5).conj;

expect(actual).toEqual(expected);
Copy link
Contributor

Choose a reason for hiding this comment

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

My first solution attempt used (f64.neg (local.get $imag)) and failed this test case

  ComplexNumber {
-   "imag": 0,
+   "imag": -0,
    "real": 5,
  }

My next attempt matched the example solution, but I can imagine students being frustrated.

Perhaps we should use toBeCloseTo

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 this pull request may close these issues.

2 participants