Closed dpsanders closed 7 years ago
Merging #207 into master will decrease coverage by
-2.59%
. The diff coverage is25%
.
@@ Coverage Diff @@
## master #207 +/- ##
==========================================
- Coverage 90.45% 87.86% -2.59%
==========================================
Files 23 23
Lines 985 1014 +29
==========================================
Hits 891 891
- Misses 94 123 +29
Impacted Files | Coverage Δ | |
---|---|---|
src/ValidatedNumerics.jl | 28.57% <ø> (-71.43%) |
:x: |
src/intervals/rounding.jl | 34.28% <32.35%> (-40.72%) |
:x: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 69bd570...8bd37ec. Read the comment docs.
As far as I can tell, unfortunately the best / only way to be able to change the global rounding type is in this rather annoying way that cannot be done interactively. The @static if
checks things that are known at compile time.
The idea is basically that the rounding mode change is implemented by defining functions like sin(0.5, RoundDown)
differently, depending on the global rounding mode, which cannot be changed interactively, or at least not simply and not in 0.6. I am not sure that this is correct or the correct solution, but it seems to work, and allows us to check the effect of using different rounding scenarios.
I am not sure that this is correct or the correct solution, but it seems to work, and allows us to check the effect of using different rounding scenarios.
The problem I see here is that you are not only changing the behavior of sin(::Interval)
but also sin(::Number)
, which is kind of dangerous.
No, I am only changing the behaviour of sin(x::Number, r::RoundingMode)
. These are functions that are currently only in CRlibm
and here.
Good to hear that the change is only local and affects only CRlibm functions!
What happens if I start Julia as I do always, without the specifications of the environment variable VN_ROUNDING
and --compilecahe=no
? Do I get the :correct
rounding mode, i.e., is that the version that is precompiled?
Is there a way of including tests with travis?
While I'm not against merging this (as you say, it seems to work), it would be nice to test it more thoroughly.
If you start it as you usually do, then you should get the :correct
rounding mode, yes.
I do not have any idea how to test this on Travis. I will try to find out.
I think I now have a better way of implementing this, so closing.
To use run Julia as follows from the command line:
The options are
fast
,none
andcorrect
. The default iscorrect
.The
--compilecache=no
is required each time the mode is changed. Currently theVN_ROUNDING=...
is required even if the mode is unchanged.Sample timings for the following benchmark function after warmup:
cc @lbenet