Skip to content

remove invalid fastmath usage in atan360 #565

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
May 23, 2025

Conversation

KristofferC
Copy link
Member

The functions need to be able to deal with infinities but fastmath assumes that arguments and results are not so.

On 1.12:

julia> Colors.atan360(-Inf, Inf)
NaN

with fastmath removed:

julia> Colors.atan360(-Inf, Inf)
315.0

I haven't looked into any of the other fastmath usages in this package.

The functions need to be able to deal with infinities and NaNs but fastmath assumes that arguments and results are not so.

On 1.12:

```
julia> Colors.atan360(-Inf, Inf)
NaN
```

with fastmath removed:

```
julia> Colors.atan360(-Inf, Inf)
315.0
```

I haven't looked into any of the other fastmath usage in this package.
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.75%. Comparing base (4664eb9) to head (f9b006b).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #565   +/-   ##
=======================================
  Coverage   96.75%   96.75%           
=======================================
  Files           9        9           
  Lines        1295     1295           
=======================================
  Hits         1253     1253           
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KristofferC
Copy link
Member Author

An alternative is to check for the possible different Inf permutations at the beginning, similar as to how it is done with NaN.

@ViralBShah
Copy link
Member

Merge?

@ViralBShah ViralBShah merged commit 3964b53 into JuliaGraphics:master May 23, 2025
11 checks passed
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.

3 participants