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

Add test for a small newton raphson package #1609

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

Smit-create
Copy link
Collaborator

This tests only on an already-defined function. We will modify this test to accept callbacks once we complete working on #1608

Related to #992

@Smit-create Smit-create requested a review from certik March 23, 2023 06:28
@Smit-create Smit-create force-pushed the i-992-1 branch 2 times, most recently from b8001d1 to 124f014 Compare March 23, 2023 11:03
while abs(func(x, c)) > err and i < maxiter:
h = func(x, c) / func_prime(x, c)
x = x - h
i += 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Convert tabs to spaces.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, some wierd issue. I have used a tab for indenting and locally looks fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably set some pre-commit hooks to autoformat the code when commiting. we can use python black as the formatter.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should use LPython as the formatter. :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup!

@certik
Copy link
Contributor

certik commented Mar 23, 2023

Beautiful, that's exactly what we need. Thanks!

@Smit-create Smit-create force-pushed the i-992-1 branch 2 times, most recently from ca43803 to 144347e Compare March 24, 2023 11:17
@Smit-create Smit-create marked this pull request as ready for review March 24, 2023 19:33
@Smit-create Smit-create requested a review from certik March 24, 2023 19:33
@Smit-create Smit-create merged commit 68888cc into lcompilers:main Mar 25, 2023
@Smit-create Smit-create deleted the i-992-1 branch March 25, 2023 03:27
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.

4 participants