Added tie-breaking exponentiation operator implementations for concrete integer types in the standard library.
- Added the exponentiation operator
**
and the compound assignment operator**=
. - Deprecated
BinaryInteger.pow(_:_:)
andMath.pow(_:_:)
.
Added a PodSpec file (and a .swift-version
file) for CocoaPods support.
Worked around a compiler segmentation fault by assuming memory bound instead of binding memory.
- Updated doc comments.
- Updated generic algorithms for revised integer protocols.
- Removed
Complex.isCanonical
andComplex.polar
. - Fixed implementation of
Complex.isNaN
andComplex.isSignalingNaN
to align with C/C++ standards: a complex value is NaN if at least one of its components is NaN and the other is not infinite. - Fixed implementation of
Complex
multiplication and division to align handling of special values with C/C++ standards. - Fixed implementation of
Complex.tanh(_:)
to align handling of special values with C/C++ standards. - Refined implementation of
Complex.description
for values with a negative imaginary component. - Fixed implementation of
Rational
initializers that convert from aBinaryFloatingPoint
value.
Fixed implementation of Rational.isProper
.
- Added integer square root and cube root functions.
- Removed
power(of:)
requirement fromMath
, substitutingpow(_:_:)
(formerly an extension method).
- Expanded tests.
- Fixed implementation of certain default implementations for protocol requirements of
Math
andReal
.
Conformed Complex
and Rational
to Codable
.
- Renamed
FloatingPointMath
toReal
. - Updated implementation of
Complex.hyperbolicTangent
to align handling of special values to revised C standard. - Updated
swift-tools-version
to4.0
.
- Removed initializer requirements from
FloatingPointMath
, moving functionality to an extension toBinaryFloatingPoint
. - Reorganized code and edited comments to improve documentation.
- Added initial implementation of a pseudo-random number generator protocol and conforming types.
- Restored constraints on
FloatingPointMath
to refineFloatingPoint
and notBinaryFloatingPoint
.
Modified FloatingPointMath
to refine BinaryFloatingPoint
instead of FloatingPoint
.
Fixed implementation of comparison in Rational<T>
.
Fixed several implementations in Rational<T>
and added tests.
Added initializers to convert from floating-point or integer values to Rational<T>
, and vice versa.
Initial implementation of:
Math
FloatingPointMath
Complex
Rational
...and extensions to:
UnsignedInteger
Float
Double