Skip to content

Trivial simplifications for arccos #39456

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

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Conversation

fchapoton
Copy link
Contributor

This is replacing #36069

supersedes #36069

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

This fixes a couple of places where arccos doesn't automatically simplify for ratios arising from the unit circle (but arcsin does). Turns out that asin_eval has some logic handling unit circle cases directly that was not replicated in acos_eval. I copy-pasted the logic from asin_eval and modified appropriately.

sagemath#24211
Copy link

github-actions bot commented Feb 5, 2025

Documentation preview for this PR (built with commit 7c5d6dc; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@fchapoton
Copy link
Contributor Author

@tscrim : would you please have time for this little one ?

I have just heard about snowing in Japan. ☃️

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Thank you for getting this all done. LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Feb 10, 2025

Indeed, Hokkaido and northern Japan got a fair bit of snow. Now I have escaped to Singapore for the week.

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 11, 2025
sagemathgh-39456: Trivial simplifications for arccos
    
This is replacing sagemath#36069

supersedes sagemath#36069

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39456
Reported by: Frédéric Chapoton
Reviewer(s): Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 18, 2025
sagemathgh-39456: Trivial simplifications for arccos
    
This is replacing sagemath#36069

supersedes sagemath#36069

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#39456
Reported by: Frédéric Chapoton
Reviewer(s): Travis Scrimshaw
@vbraun vbraun merged commit c22e484 into sagemath:develop Feb 21, 2025
22 of 24 checks passed
@fchapoton fchapoton deleted the arccos_branch branch February 22, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants