-
Notifications
You must be signed in to change notification settings - Fork 71
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
Allow user to easily specify to use faster, but less tight, functions #56
Comments
This would use the same approach as for interval rounding modes: the functions themselves are redefined. |
If I understand the idea, we will have some default version for We should test what is more convenient in performance for the |
That wasn't quite what I had in mind, since what I want to be able to do is use I agree that we can just do it with traits, though, that's a good idea. |
I see. In a way, it is to have the possibility of |
Instead of a global option you could also encode this in the type system itself. Then you can use multiple dispatch for the relevant functions where it makes a difference without introducing new methods or similar. abstract type Emphasis end
struct Accurate <: Emphasis end
struct Performance <: Emphasis end
struct Interval{T<:Real, E<:Emphasis} <: AbstractInterval{T}
lo :: T
hi :: T
end |
That's a very interesting idea, @saschatimme, thanks! It's a bit counterintuitive, since the accuracy / performance are properties of the functions that act on intervals, not of the intervals themselves. I think it's done like this in several of the C++ interval packages. What do you think, @lbenet ? |
Would you like to open a new issue about this, @saschatimme ? |
Function choices including:
Current
ˆ
(tight, slow; rename totight_power
) vs.pow
(less tight, fast; rename tofast_power
) -- choose one of them to use as^
and the other aspow
convert(Interval, x::Float64)
(tight vs. accurate)Fast versions of
tanh
etc. (all functions not exported by CRlibm, for which MPFR is currently used)Syntax something like
Can be a non-exported function.
The text was updated successfully, but these errors were encountered: