Jeffrey Sarnoff
Jeffrey Sarnoff
(which approach is more performant depends on how performant or otherwise setting and resetting rounding happens to be, and specifics of the processor [can we run rounding control outside of...
Where is the current implementation type unstable?
as a start, these more structured variants are type stable ``` function max_ignore_nans(args::Vector{T}) where {T!isnan(x), args)...) end function max_ignore_nans22(args::Vararg{T}) where {T} max(filter(x->!isnan(x), args)...) end ```
if any is NaN the result is (NaN, NaN) a function guard is in order ``` @inline function nan_guard(a::T, b::T, c::T) isnan(a+b+c) end function interval_fma(a::T, b::T, c::T) nan_guard(a, b, c)...
``` @inline nan_guard(a::T, b::T, c::T) where {T} = isnan(a+b+c) function interval_fma(a::T, b::T, c::T) where {T
I am putting together some comparisons too. What is happening here? What is the correct intuition? ``` julia> a=Interval(sin(0.5)) [0.479425, 0.479426] julia> a.lo==a.hi true ``` I had expected ``` julia>...
why does ``` julia> a=Interval(sin(0.5)) [0.479425, 0.479426] julia> a.lo==a.hi true ``` show `[0.479425, 0.479426]` rather than `[0.479426, 0.479426]` as `a.lo==a.hi==0.479_425_538_604_203`
There is code in `display.jl` that rounds the value after converting it to a string. That is a very powerful approach, and essential to the philosophical integrity of `ArbFloats.jl` (to...
15x is 10 times faster than 1.5x, which is my waterline for "worth the effort" I suppose fma1 is well worth the, apparently 1/10th effort, we expended. 😃
Why not do something similar to ``` function FMA(a::T, b::T, c::T) where T fma_hi = fma(a, b, c) isnan(fma_hi) && return (T(NaN), T(NaN)) isinf(fma_hi) && return (fma_hi, fma_hi) .... end...