File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 627627# macro
628628
629629"""
630+ @interval(expr)
630631 @interval(T, expr)
631632 @interval(T, expr1, expr2)
632633
@@ -638,13 +639,20 @@ constructor [`atomic`](@ref).
638639```jldoctest
639640julia> setdisplay(:full);
640641
641- julia> @macroexpand @interval Float64 sin(1)
642+ julia> @macroexpand @interval sin(1) # Float64 is the default bound type
642643:(sin(IntervalArithmetic.atomic(Float64, 1)))
643644
645+ julia> @macroexpand @interval Float32 sin(1)
646+ :(sin(IntervalArithmetic.atomic(Float32, 1)))
647+
644648julia> @interval Float64 sin(1) exp(1)
645649Interval{Float64}(0.8414709848078965, 2.7182818284590455, com)
646650```
647651"""
652+ macro interval (expr)
653+ return _wrap_interval (default_numtype (), expr)
654+ end
655+
648656macro interval (T, expr)
649657 return _wrap_interval (T, expr)
650658end
You can’t perform that action at this time.
0 commit comments