Macro inari::dec_interval
source Β· macro_rules! dec_interval { ($s:expr) => { ... }; ($a:expr, $b:expr) => { ... }; }
Expand description
Creates a DecInterval
from f64
bounds or from a decorated interval literal.
There are two variants of the macro:
-
dec_interval!(a, b)
Creates a decorated interval $[a, b]$ with the strongest decoration. The condition $a β€ b β§ a < +β β§ b > -β$ must be held.
a
andb
must bef64
values. -
dec_interval!(s)
Creates a decorated interval from a decorated interval literal.
s
must be a string slice (&str
).
The result is a Result<DecInterval>
.
If the construction is invalid,
an Err
value with IntervalErrorKind::UndefinedOperation
is returned.
If it fails to determine whether the construction is valid or not,
IntervalErrorKind::PossiblyUndefinedOperation
is returned.
For creating a constant, the macro const_dec_interval!
should be preferred over this one.