Skip to content

Added inverse sine and inverse cosine #3198

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
wants to merge 55 commits into from
Closed

Added inverse sine and inverse cosine #3198

wants to merge 55 commits into from

Conversation

rk3141
Copy link
Contributor

@rk3141 rk3141 commented Oct 2, 2021

No description provided.

youknowone and others added 8 commits October 1, 2021 22:35
Signed-off-by: snowapril <sinjihng@gmail.com>
Signed-off-by: snowapril <sinjihng@gmail.com>
Signed-off-by: snowapril <sinjihng@gmail.com>
Signed-off-by: snowapril <sinjihng@gmail.com>
Signed-off-by: snowapril <sinjihng@gmail.com>
@@ -78,12 +78,23 @@ mod cmath {
z.to_complex().sin()
}

/// Return the inverse sine of z
Copy link
Member

Choose a reason for hiding this comment

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

We don't write our original document here. They are expected to be same as CPython.

Actually we don't need document anyomre. #3101 is recently brought up, so you simply can remove comment here to let it follow the default CPython document database.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. Should i also remove all the comments which were there previously?

DimitrisJim and others added 2 commits October 2, 2021 17:27
Fix pystruct incompatibility and add `test_buffer.py` from cpython 3.8
@egemengol
Copy link

I think updating the tests may be worthwhile, you could refer to #3200 if you want to

@rk3141
Copy link
Contributor Author

rk3141 commented Oct 2, 2021

ok!

@rk3141
Copy link
Contributor Author

rk3141 commented Oct 2, 2021

i have made the changes in test_cmath.py

@DimitrisJim
Copy link
Member

You'll need to rebase, there were recent changes in cmath that you need to include. Running the tests will currently fail since asin and acos have some slight rounding errors as discussed #3039. For now, include the additional changes in test_cmath as done in #3200, i.e:

# TODO: RUSTPYTHON
# This line currently fails for acos and asin
# cmath.asin(0.2) should produce a real number,
# but imaginary part is 1.1102230246251565e-16 for both.
if fn != "asin" and fn != "acos":
    self.assertEqual(0., z.imag)

@youknowone I'll handle this PR and then open another one to bring test_cmath as close as possible to its original form.

@DimitrisJim
Copy link
Member

Great! You'll just need to rebase now, there's still conflicts present.

@youknowone
Copy link
Member

rebase is required, not merge(or pull)

check this article: https://www.atlassian.com/git/tutorials/merging-vs-rebasing

@rk3141
Copy link
Contributor Author

rk3141 commented Oct 4, 2021

I am very sorry for making this mess, how can i fix this? Sorry for the trouble 😔

@youknowone
Copy link
Member

I would do squash(using rebase -i to last common commit) everything to a single commit and cherry-pick it onto the upstream main.

@rk3141 rk3141 closed this Oct 5, 2021
@rk3141
Copy link
Contributor Author

rk3141 commented Oct 5, 2021

Other PR

Sorry for troubling you, but I couldnt figure out how to fix this 😔

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.

9 participants