Items marked with
- Implemented the traits
Send
,Sync
, andUnpin
for(Dec)Interval
.
⚠️ Renamed(Dec)Interval::round_ties_to_even
to(DecInterval)::round_ties_even
.
- Implemented
(Dec)Interval::mul_rev_to_pair
.
⚠️ Bumped the minimum supported Rust version to 1.65.0.⚠️ Updated the following dependencies:gmp-mpfr-sys
from 1.4 to 1.5.rug
from 1.11 to 1.19.
⚠️ Bumped the minimum supported Rust version to 1.61.0.
-
⚠️ Removed the macrointerval!(s, exact)
.Use the macro
interval_exact!(s)
introduced in v0.14.0 instead. (The removal should have been made in that version.)
This is the first version of the crate that covers all required operations of IEEE Std 1788.1-2017.
- Implemented
(Dec)Interval::cancel_minus
andcancel_plus
.
⚠️ Revised the syntax of the macrointerval!(s, exact)
tointerval_exact!(s)
.
⚠️ Renamed(Dec)Interval::pown
to(Dec)Interval::powi
so that it matches with the standard methodf64::powi
.
- Implemented the standard arithmetic operators
std::ops::{Neg, Add, Sub, Mul, Div}
and the corresponding assignment operatorsstd::ops::{AddAssign, SubAssign, MulAssign, DivAssign}
for(Dec)Interval
for the cases when one or both of the arguments are given by reference.
The crate requires a nightly toolchain >= nightly-2021-12-16
.
- Fixed build failure on the latest nightly toolchain.
The crate requires a nightly toolchain >= nightly-2021-10-05
.
- Downstream crates are no longer required to specify the
static_assertions
crate as their dependency.
- Now inari supports
x86_64-pc-windows-gnu
as a target.
- Implemented the trait
Hash
forInterval
,Decoration
, andOverlap
.
-
⚠️ Removed the methodIntervalError::value
.Previously, the following values were returned by the method:
err.kind()
err.value()
IntervalErrorKind::UndefinedOperation
Interval::EMPTY
orDecInterval::NAI
IntervalErrorKind::PossiblyUndefinedOperation
(Dec)Interval::ENTIRE
⚠️ Changed the return type of the functions(Dec)Interval::try_from_be_bytes
,try_from_le_bytes
andtry_from_ne_bytes
toOption<(Dec)Interval>
.⚠️ Changed the structIntervalError
to be non-generic due to the removal of thevalue
method.
- Fixed the macros
interval!(s)
anddec_interval!(s)
to return anErr
withIntervalErrorKind::PossiblyUndefinedOperation
when the mantissa has too many digits after the decimal point.
- Fixed build failure with the latest nightly rust compiler:
rustc 1.54.0-nightly (6c2dd251b 2021-06-05)
.
- Fixed the functions
(Dec)Interval::try_from_be_bytes
,try_from_le_bytes
andtry_from_ne_bytes
to correctly deserialize the empty interval.
- Experimental support for AArch64.
⚠️ Explicitly check the target CPU features during compilation. From this version, you need to specifyRUSTFLAGS='-Ctarget-cpu=<CPU>'
, where<CPU>
must behaswell
or a newer microarchitecture; otherwise, build fails.
- Experimental support for AVX-512F.
- To try it out, run cargo with
RUSTFLAGS='-Ctarget-feature=+avx512f'
. - Basic arithmetic operations are expected to get faster, but it is not benchmarked yet.
- To try it out, run cargo with
⚠️ Removed the enum variantIntervalErrorKind::IntvlPartOfNaI
.
⚠️ Renamed the method(Dec)Interval::round_ties_to_away
toround
.⚠️ Renamed the methodsDecInterval::interval_part
anddecoration_part
tointerval
anddecoration
, respectively.⚠️ Changed the return type of the methodDecInterval::interval
(formerinterval_part
) toOption<Interval>
fromResult<Interval>
.⚠️ Renamed the enumOverlappingState
toOverlap
.
⚠️ RenamedDecoratedInterval
toDecInterval
. Now its name is consistent with the macro(const_)dec_interval!
.
- Fixed the build failure on docs.rs.
- Implemented the trait
Eq
for the enumOverlappingState
.
⚠️ Removed the enum variantOverlappingState::Undefined
.
⚠️ Changed the return type of the methodDecoratedInterval::overlap
toOption<OverlappingState>
fromOverlappingState
.- Now it returns
None
if at least one of its arguments is NaI.
- Now it returns
⚠️ Renamed the enum variantOverlappingState::Equal
toEquals
.
- Fixed the macro
const_dec_interval!
to be usable without importing the macroconst_interval!
.
⚠️ Renamed the method(Decorated)Interval::log
toln
to make them consistent withf64::ln
.
- Added type conversions between intervals and byte arrays.
(Decorated)Interval::to_be_bytes
,to_le_bytes
andto_ne_bytes
convert intervals into byte arrays.(Decorated)Interval::try_from_be_bytes
,try_from_le_bytes
andtry_from_ne_bytes
convert byte arrays into intervals.
- Added the type alias
Result<T> = std::result::Result<T, IntervalError<T>>
.
- Fixed the decoration returned by
atan2
.- Previously,
Def
was returned instead ofDac
in certain cases.
- Previously,
- Fixed the Clippy warning
double_neg
caused by passing a negative value as the lower bound to the macroconst_interval!
.
- Fixed decorations returned by constructors of
DecoratedInterval
and elementary functionsacos
,acosh
,asin
,atan2
,atanh
,log
,log2
,log10
andpow
.atan2
is still under investigation. so use it with caution.- Fixed broken unit tests.
-
Added the elementary functions
(Decorated)Interval::pown
,pow
,exp
,exp2
,exp10
,log
,log2
,log10
,sin
,cos
,tan
,asin
,acos
,atan
,atan2
,sinh
,cosh
,tanh
,asinh
,acosh
andatanh
. -
Added the macros
const_interval!
andconst_dec_interval!
which let you make intervals fromf64
numbers in const contexts. -
Added the constants
(Decorated)Interval::EMPTY
,ENTIRE
andDecoratedInterval::NAI
.
⚠️ Removed the functions(Decorated)Interval::empty
,entire
andDecoratedInterval::nai
in favor of the new constants.
⚠️ Changeed the representation of the structDecoratedInterval
to#[repr(C)]
from the default one, while users must not rely on it.
- Fixed the methods
Interval::rad
andwid
to round the results up.
- Added the decoration system.
- Added the struct
DecoratedInterval
. - Added the macro
dec_interval!
that constructs a decorated interval. - Added the enum
Decoration
. ⚠️ Added the enum variantIntervalErrorKind::IntvlPartOfNaI
.⚠️ Added the enum variantOverlappingState::Undefined
.
- Added the struct
- Added the macro rule
interval!("...", exact)
that constructs an interval from an exact interval literal (exactToInterval
in the standard).
⚠️ Renamed the functionInterval::is_member
tocontains
and swapped the order of parameters to make it a method.⚠️ Changed the methodIntervalError<T>::value
to takeself
instead of&self
.
Initial release.