Releases: ociaw/RandN
Releases · ociaw/RandN
Version 0.4.0
Full Changelog
- Added .NET 6 and .NET 7 targets
- (Breaking Change) Dropped .NET 5 target
- Deprecated the CryptoServiceProvider RNG due to deprecation of RNGCryptoServiceProvider
- Added the SystemCryptoRNG to replace CryptoServiceProvider
- Added the Singleton distribution
- Added Select and SelectMany extension methods for IDistribution
- Support for SIMD acceleration of ChaCha on ARM when running on .NET 7 or later
RandN.Core
- Added .NET 6 and .NET 7 targets
- (Breaking Change) Dropped .NET 5 target
- Added nullable annotations to
IDistribution<T>.TrySample
Version 0.3.0
- Moved the IDistribution and IPortableDistribution interfaces to RandN.Core
- Removed NullGuard.Fody from public dependencies - this was only needed for build and was being
unnecessarily included in all dependents. - Fixed tests failing to run on Mono.
Version 0.2.0
New APIs
- The marker-interface IPortableDistribution has been created to mark distributions that provide portable and repeatable results across all platforms. Currently, the Bernoulli, the uniform
Decimal
, the uniformTimeSpan
, and all the uniform integer distributions are portable. - Added BlockBuffer32<TBlockRng, TBlockCounter>.BlockLength for consistency with BlockBuffer32.BlockLength.
Updated APIs
- Uniform distributions now live have been grouped into nested classes under the Uniform static class. For example,
UniformInt32
has become Uniform.Int32. - Unit interval distributions now live in the Rand.Distributions.UnitInterval namespace and have been grouped
into nested classes. For example,UnitInterval.OpenDouble
has become UnitInterval.Open.Double. - Method arguments now have null-checks injected by NullGuard.Fody instead of relying on the honor system.
- The
TRng
type parameter of IRngFactory and IReproducibleRngFactory<TRng, TSeed> is now covariant (IRngFactory<out TRng>
). BlockBuffer32<TBlockRng>.Length
has been renamed toBlockLength
.
Removed APIs
- Removed the
Sample
extension methods - these were questionably useful, and could be up to four times slower than their non-extension counterpart, IDistribution.Sample.
Bug fixes
- Distributions returning floating point numbers would sometimes sample a number outside the desired range on .NET Framework x86, which can use 80-bit floating point calculations, instead of 64-bit. Results are now forced to 64-bit precision before returning.
BitwiseExtensions.RotateRight
now rotates bits right instead of left on .NET Core 3.1+.- All places where overflow is expected is now wrapped with
unchecked
.
Miscellaneous
- Full test coverage, excluding portions that can't be tested without a big-endian processor.
- Pure methods and properties in
RandN.Core
have been marked with the [Pure] attribute. - Use of C# 9 features across the board where possible.
- Fixed a bunch of things suggested by ReSharper.
- More benchmarks have been added.
Version 0.1.0
v0.1.0 Bump version to 0.1.0
Version 0.1.0 beta
Beta of first release