JuliaIntervals / IntervalArithmetic.jl

Library for validated numerics using interval arithmetic
https://juliaintervals.github.io/IntervalArithmetic.jl/
Other
297 stars 71 forks source link

Define and export Heaviside function #653

Closed dpsanders closed 4 months ago

dpsanders commented 4 months ago
julia> function heaviside(x::Interval)
           if sup(x) > 0
               if inf(x) > 0 return 1..1
               else return 0..1
               end
           end
           return 0..0
       end
OlivierHnt commented 4 months ago

Of course one would have to also change the decoration at the jump point 0.

dpsanders commented 4 months ago

Superseded by https://github.com/JuliaIntervals/IntervalArithmetic.jl/issues/655