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 627
627
# macro
628
628
629
629
"""
630
+ @interval(expr)
630
631
@interval(T, expr)
631
632
@interval(T, expr1, expr2)
632
633
@@ -638,13 +639,20 @@ constructor [`atomic`](@ref).
638
639
```jldoctest
639
640
julia> setdisplay(:full);
640
641
641
- julia> @macroexpand @interval Float64 sin(1)
642
+ julia> @macroexpand @interval sin(1) # Float64 is the default bound type
642
643
:(sin(IntervalArithmetic.atomic(Float64, 1)))
643
644
645
+ julia> @macroexpand @interval Float32 sin(1)
646
+ :(sin(IntervalArithmetic.atomic(Float32, 1)))
647
+
644
648
julia> @interval Float64 sin(1) exp(1)
645
649
Interval{Float64}(0.8414709848078965, 2.7182818284590455, com)
646
650
```
647
651
"""
652
+ macro interval (expr)
653
+ return _wrap_interval (default_numtype (), expr)
654
+ end
655
+
648
656
macro interval (T, expr)
649
657
return _wrap_interval (T, expr)
650
658
end
You can’t perform that action at this time.
0 commit comments