-
Notifications
You must be signed in to change notification settings - Fork 28
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
Teach julia that NaNMath
functions don't have effects
#67
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #67 +/- ##
==========================================
+ Coverage 97.05% 97.08% +0.02%
==========================================
Files 1 1
Lines 136 137 +1
==========================================
+ Hits 132 133 +1
Misses 4 4 ☔ View full report in Codecov by Sentry. |
I'm not the right person to review this. |
NaNMath
functions don't have effectsAssume effectsNaNMath
functions don't have effects
This needs a review from someone who understands |
I've talked to @vtjnash about this a bit and he thinks that libm might be leaking effectful information (rounding modes and signals) but I haven't been able to find observe this. |
In particular, note that C documentation for these explicitly states these are not pure due to side effects. |
however the two areas of impurity (rounding modes and flags) appear not to be accessible from julia (or at least I haven't been able to observe the impurity) |
@oscardssmith can you update this and drop the compat? |
d51c509
to
e9ef8b9
Compare
Actually that was simple enough. Looks right. |
This allows constant folding and dead code elimination on Julia 1.8 and up.