1 interface inheriting from IFloatingPoint
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Numerics\IFloatingPointIeee754.cs (1)
10IFloatingPoint<TSelf>,
1 implementation of IFloatingPoint
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
70IFloatingPoint<decimal>,
200 references to IFloatingPoint
PresentationCore.Tests (1)
FluentAssertions\ComparisonHelpers.cs (1)
19where T : struct, IFloatingPoint<T>
System.Numerics.Tensors (43)
System\Numerics\Tensors\netcore\Tensor.cs (18)
348public static ref readonly TensorSpan<T> FillGaussianNormalDistribution<T>(in TensorSpan<T> destination, Random? random = null) where T : IFloatingPoint<T> 371public static ref readonly TensorSpan<T> FillUniformDistribution<T>(in TensorSpan<T> destination, Random? random = null) where T : IFloatingPoint<T> 2883where T : IFloatingPoint<T> 2896where T : IFloatingPoint<T> 3379where T : IFloatingPoint<T> 3390where T : IFloatingPoint<T> 4458where T : IFloatingPoint<T> 4469where T : IFloatingPoint<T> 4560where T : IFloatingPoint<T> 4571where T : IFloatingPoint<T> 4583where T : IFloatingPoint<T> 4596where T : IFloatingPoint<T> 4607where T : IFloatingPoint<T> 4619where T : IFloatingPoint<T> 4630where T : IFloatingPoint<T> 4642where T : IFloatingPoint<T> 4945where T : IFloatingPoint<T> 4956where T : IFloatingPoint<T>
System\Numerics\Tensors\netcore\TensorOperation.cs (5)
799where T : IFloatingPoint<T> 1126where T : IFloatingPoint<T> 1784where T : IFloatingPoint<T> 1843where T : IFloatingPoint<T> 2203where T : IFloatingPoint<T>
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (2)
22where T : IFloatingPoint<T> 32private readonly struct CeilingOperator<T> : IUnaryOperator<T, T> where T : IFloatingPoint<T>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (2)
23where TFrom : IFloatingPoint<TFrom> 29where TFrom : IFloatingPoint<TFrom>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (2)
23where TFrom : IFloatingPoint<TFrom> 29where TFrom : IFloatingPoint<TFrom>
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (2)
22where T : IFloatingPoint<T> 32private readonly struct FloorOperator<T> : IUnaryOperator<T, T> where T : IFloatingPoint<T>
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
24where T : IFloatingPoint<T> 100private readonly struct ReciprocalOperator<T> : IUnaryOperator<T, T> where T : IFloatingPoint<T>
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (8)
23where T : IFloatingPoint<T> 45where T : IFloatingPoint<T> 90public static void Round<T>(ReadOnlySpan<T> x, int digits, Span<T> destination) where T : IFloatingPoint<T> => 108where T : IFloatingPoint<T> 172private readonly struct RoundToEvenOperator<T> : IUnaryOperator<T, T> where T : IFloatingPoint<T> 248private readonly struct RoundAwayFromZeroOperator<T> : IUnaryOperator<T, T> where T : IFloatingPoint<T> 306where T : IFloatingPoint<T> 357where T : IFloatingPoint<T>
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
24where T : IFloatingPoint<T> 34private readonly struct TruncateOperator<T> : IUnaryOperator<T, T> where T : IFloatingPoint<T>
System.Private.CoreLib (150)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (18)
1121/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToInteger{TInteger}(TSelf)" /> 1125/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToIntegerNative{TInteger}(TSelf)" /> 1129/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentByteCount()" /> 1130int IFloatingPoint<decimal>.GetExponentByteCount() => sizeof(sbyte); 1132/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentShortestBitLength()" /> 1133int IFloatingPoint<decimal>.GetExponentShortestBitLength() 1139/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandByteCount()" /> 1140int IFloatingPoint<decimal>.GetSignificandByteCount() => sizeof(ulong) + sizeof(uint); 1142/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandBitLength()" /> 1143int IFloatingPoint<decimal>.GetSignificandBitLength() => 96; 1145/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" /> 1146bool IFloatingPoint<decimal>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten) 1159/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" /> 1160bool IFloatingPoint<decimal>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten) 1173/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" /> 1174bool IFloatingPoint<decimal>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten) 1202/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" /> 1203bool IFloatingPoint<decimal>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Double.cs (25)
656/// <inheritdoc cref="IFloatingPoint{TSelf}.Ceiling(TSelf)" /> 660/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToInteger{TInteger}(TSelf)" /> 665/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToIntegerNative{TInteger}(TSelf)" /> 679/// <inheritdoc cref="IFloatingPoint{TSelf}.Floor(TSelf)" /> 683/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf)" /> 687/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int)" /> 690/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, MidpointRounding)" /> 693/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int, MidpointRounding)" /> 696/// <inheritdoc cref="IFloatingPoint{TSelf}.Truncate(TSelf)" /> 700/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentByteCount()" /> 701int IFloatingPoint<double>.GetExponentByteCount() => sizeof(short); 703/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentShortestBitLength()" /> 704int IFloatingPoint<double>.GetExponentShortestBitLength() 718/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandByteCount()" /> 719int IFloatingPoint<double>.GetSignificandByteCount() => sizeof(ulong); 721/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandBitLength()" /> 722int IFloatingPoint<double>.GetSignificandBitLength() => 53; 724/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" /> 725bool IFloatingPoint<double>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten) 737/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" /> 738bool IFloatingPoint<double>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten) 750/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" /> 751bool IFloatingPoint<double>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten) 763/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" /> 764bool IFloatingPoint<double>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Half.cs (25)
1308/// <inheritdoc cref="IFloatingPoint{TSelf}.Ceiling(TSelf)" /> 1311/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToInteger{TInteger}(TSelf)" /> 1315/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToIntegerNative{TInteger}(TSelf)" /> 1319/// <inheritdoc cref="IFloatingPoint{TSelf}.Floor(TSelf)" /> 1322/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf)" /> 1325/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int)" /> 1328/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, MidpointRounding)" /> 1331/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int, MidpointRounding)" /> 1334/// <inheritdoc cref="IFloatingPoint{TSelf}.Truncate(TSelf)" /> 1337/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentByteCount()" /> 1338int IFloatingPoint<Half>.GetExponentByteCount() => sizeof(sbyte); 1340/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentShortestBitLength()" /> 1341int IFloatingPoint<Half>.GetExponentShortestBitLength() 1355/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandByteCount()" /> 1356int IFloatingPoint<Half>.GetSignificandByteCount() => sizeof(ushort); 1358/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandBitLength()" /> 1359int IFloatingPoint<Half>.GetSignificandBitLength() => SignificandLength; 1361/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" /> 1362bool IFloatingPoint<Half>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten) 1375/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" /> 1376bool IFloatingPoint<Half>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten) 1389/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" /> 1390bool IFloatingPoint<Half>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten) 1402/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" /> 1403bool IFloatingPoint<Half>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (23)
975/// <inheritdoc cref="IFloatingPoint{TSelf}.Ceiling(TSelf)" /> 978/// <inheritdoc cref="IFloatingPoint{TSelf}.Floor(TSelf)" /> 981/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf)" /> 984/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int)" /> 987/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, MidpointRounding)" /> 990/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int, MidpointRounding)" /> 993/// <inheritdoc cref="IFloatingPoint{TSelf}.Truncate(TSelf)" /> 996/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentByteCount()" /> 997int IFloatingPoint<BFloat16>.GetExponentByteCount() => sizeof(sbyte); 999/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentShortestBitLength()" /> 1000int IFloatingPoint<BFloat16>.GetExponentShortestBitLength() 1014/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandByteCount()" /> 1015int IFloatingPoint<BFloat16>.GetSignificandByteCount() => sizeof(ushort); 1017/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandBitLength()" /> 1018int IFloatingPoint<BFloat16>.GetSignificandBitLength() => SignificandLength; 1020/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" /> 1021bool IFloatingPoint<BFloat16>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten) 1034/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" /> 1035bool IFloatingPoint<BFloat16>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten) 1048/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" /> 1049bool IFloatingPoint<BFloat16>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten) 1061/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" /> 1062bool IFloatingPoint<BFloat16>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Numerics\IFloatingPoint.cs (1)
12where TSelf : IFloatingPoint<TSelf>?
src\libraries\System.Private.CoreLib\src\System\Numerics\INumber.cs (4)
81/// <remarks>For <see cref="IFloatingPoint{TSelf}" /> this method matches the IEEE 754:2019 <c>maximum</c> function. This requires NaN inputs to be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks> 116/// <remarks>For <see cref="IFloatingPoint{TSelf}" /> this method matches the IEEE 754:2019 <c>maximumNumber</c> function. This requires NaN inputs to not be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks> 142/// <remarks>For <see cref="IFloatingPoint{TSelf}" /> this method matches the IEEE 754:2019 <c>minimum</c> function. This requires NaN inputs to be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks> 177/// <remarks>For <see cref="IFloatingPoint{TSelf}" /> this method matches the IEEE 754:2019 <c>minimumNumber</c> function. This requires NaN inputs to not be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (25)
980/// <inheritdoc cref="IFloatingPoint{TSelf}.Ceiling(TSelf)" /> 983/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToInteger{TInteger}(TSelf)" /> 987/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToIntegerNative{TInteger}(TSelf)" /> 991/// <inheritdoc cref="IFloatingPoint{TSelf}.Floor(TSelf)" /> 994/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf)" /> 997/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int)" /> 1000/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, MidpointRounding)" /> 1003/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int, MidpointRounding)" /> 1006/// <inheritdoc cref="IFloatingPoint{TSelf}.Truncate(TSelf)" /> 1009/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentByteCount()" /> 1010int IFloatingPoint<NFloat>.GetExponentByteCount() => sizeof(NativeExponentType); 1012/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentShortestBitLength()" /> 1013int IFloatingPoint<NFloat>.GetExponentShortestBitLength() 1027/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandByteCount()" /> 1028int IFloatingPoint<NFloat>.GetSignificandByteCount() => sizeof(NativeSignificandType); 1030/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandBitLength()" /> 1031int IFloatingPoint<NFloat>.GetSignificandBitLength() 1040/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" /> 1041bool IFloatingPoint<NFloat>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten) 1064/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" /> 1065bool IFloatingPoint<NFloat>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten) 1088/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" /> 1089bool IFloatingPoint<NFloat>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten) 1112/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" /> 1113bool IFloatingPoint<NFloat>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\ISimdVector_2.cs (4)
564/// <remarks>For <see cref ="IFloatingPoint{T}" /> this method matches the IEEE 754:2019 <c>maximum</c> function.This requires NaN inputs to be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks> 595/// <remarks>For <see cref="IFloatingPoint{T}" /> this method matches the IEEE 754:2019 <c>maximumNumber</c> function. This requires NaN inputs to not be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks> 603/// <remarks>For <see cref ="IFloatingPoint{T}" /> this method matches the IEEE 754:2019 <c>minimum</c> function.This requires NaN inputs to be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks> 634/// <remarks>For <see cref="IFloatingPoint{T}" /> this method matches the IEEE 754:2019 <c>minimumNumber</c> function. This requires NaN inputs to not be propagated back to the caller and for <c>-0.0</c> to be treated as less than <c>+0.0</c>.</remarks>
src\libraries\System.Private.CoreLib\src\System\Single.cs (25)
651/// <inheritdoc cref="IFloatingPoint{TSelf}.Ceiling(TSelf)" /> 655/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToInteger{TInteger}(TSelf)" /> 660/// <inheritdoc cref="IFloatingPoint{TSelf}.ConvertToIntegerNative{TInteger}(TSelf)" /> 674/// <inheritdoc cref="IFloatingPoint{TSelf}.Floor(TSelf)" /> 678/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf)" /> 682/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int)" /> 685/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, MidpointRounding)" /> 688/// <inheritdoc cref="IFloatingPoint{TSelf}.Round(TSelf, int, MidpointRounding)" /> 691/// <inheritdoc cref="IFloatingPoint{TSelf}.Truncate(TSelf)" /> 695/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentByteCount()" /> 696int IFloatingPoint<float>.GetExponentByteCount() => sizeof(sbyte); 698/// <inheritdoc cref="IFloatingPoint{TSelf}.GetExponentShortestBitLength()" /> 699int IFloatingPoint<float>.GetExponentShortestBitLength() 713/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandByteCount()" /> 714int IFloatingPoint<float>.GetSignificandByteCount() => sizeof(uint); 716/// <inheritdoc cref="IFloatingPoint{TSelf}.GetSignificandBitLength()" /> 717int IFloatingPoint<float>.GetSignificandBitLength() => 24; 719/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentBigEndian(Span{byte}, out int)" /> 720bool IFloatingPoint<float>.TryWriteExponentBigEndian(Span<byte> destination, out int bytesWritten) 733/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteExponentLittleEndian(Span{byte}, out int)" /> 734bool IFloatingPoint<float>.TryWriteExponentLittleEndian(Span<byte> destination, out int bytesWritten) 747/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandBigEndian(Span{byte}, out int)" /> 748bool IFloatingPoint<float>.TryWriteSignificandBigEndian(Span<byte> destination, out int bytesWritten) 760/// <inheritdoc cref="IFloatingPoint{TSelf}.TryWriteSignificandLittleEndian(Span{byte}, out int)" /> 761bool IFloatingPoint<float>.TryWriteSignificandLittleEndian(Span<byte> destination, out int bytesWritten)
System.Private.Windows.Core.TestUtilities (2)
ComparisonHelpers.cs (1)
19where T : struct, IFloatingPoint<T>
XUnit\FloatingPointToleranceComparerer.cs (1)
12where T : struct, IFloatingPoint<T>
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
384[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.IFloatingPoint<>))]
System.Windows.Forms.Primitives.TestUtilities (3)
Extensions\AssertExtensions.cs (3)
578where T : struct, IFloatingPoint<T> 617where T : IFloatingPoint<T> 621where T : IFloatingPoint<T>