Skip to content

Conversation

OlivierHnt
Copy link
Member

This PR implements a reliable code to determine quadrants for trigonometric functions.

@dpsanders do you mind having a look?

Closes #622


lo_quadrant = _quadrant(lo)
hi_quadrant = _quadrant(hi)
lo_quadrant = _quadrant(min, lo)
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need the min and max here?

Copy link
Member Author

Choose a reason for hiding this comment

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

_quadrant may return two distinct integers. What min/max aims to do is to "overshoot" the quadrants: for the lowest (resp. largest) value of the interval, we want the smallest (resp. largest) quadrant.

Copy link
Member

@dpsanders dpsanders left a comment

Choose a reason for hiding this comment

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

LGTM as far as I can tell, thanks!

@OlivierHnt OlivierHnt merged commit bb79e22 into JuliaIntervals:master May 27, 2024
@OlivierHnt OlivierHnt deleted the quadrant branch May 27, 2024 20:37
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.

Finding quadrants is flawed

2 participants