16 implementations of One
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
550static byte INumberBase<byte>.One => One;
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1428static char INumberBase<char>.One => (char)1;
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1299static decimal INumberBase<decimal>.One => One;
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1033static double INumberBase<double>.One => One;
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
664static short INumberBase<short>.One => One;
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
705static int INumberBase<int>.One => One;
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
702static long INumberBase<long>.One => One;
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
697static nint INumberBase<nint>.One => 1;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1282static NFloat INumberBase<NFloat>.One => new NFloat(NativeType.One);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
627static sbyte INumberBase<sbyte>.One => One;
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1030static float INumberBase<float>.One => One;
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
569static ushort INumberBase<ushort>.One => One;
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
608static uint INumberBase<uint>.One => One;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
607static ulong INumberBase<ulong>.One => One;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
610static nuint INumberBase<nuint>.One => 1;
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
929static Complex INumberBase<Complex>.One => new Complex(1.0, 0.0);
58 references to One
System.Numerics.Tensors (14)
System\Numerics\Tensors\netcore\TensorOperation.cs (3)
1756destination = T.One / x; 1840destination = T.One / (T.One + T.Exp(-x));
System\Numerics\Tensors\netcore\TensorPrimitives.DivRem.cs (1)
102public static T RemainderMaskValue => T.One;
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
75public static T Invoke(T x) => T.One / x; 84public static T Invoke(T x) => T.One / T.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs (8)
40public static T Invoke(T x) => T.One / (T.One + T.Exp(-x)); 41public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Create(T.One) / (Vector128.Create(T.One) + ExpOperator<T>.Invoke(-x)); 42public static Vector256<T> Invoke(Vector256<T> x) => Vector256.Create(T.One) / (Vector256.Create(T.One) + ExpOperator<T>.Invoke(-x)); 43public static Vector512<T> Invoke(Vector512<T> x) => Vector512.Create(T.One) / (Vector512.Create(T.One) + ExpOperator<T>.Invoke(-x));
System.Private.CoreLib (29)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
549/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1427/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1298/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1032/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1747/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1274/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
663/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
704/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
701/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
696/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
429overflow |= TInteger.IsGreaterThanAsUnsigned(answer, TInteger.MaxValue + (isNegative ? TInteger.One : TInteger.Zero));
src\libraries\System.Private.CoreLib\src\System\Numerics\IBinaryInteger.cs (1)
40return TSelf.IsNegative(value) ? TSelf.Zero : ((bitCount - TSelf.One) ^ TSelf.Log2(value));
src\libraries\System.Private.CoreLib\src\System\Numerics\IExponentialFunctions.cs (3)
20static virtual TSelf ExpM1(TSelf x) => TSelf.Exp(x) - TSelf.One; 30static virtual TSelf Exp2M1(TSelf x) => TSelf.Exp2(x) - TSelf.One; 40static virtual TSelf Exp10M1(TSelf x) => TSelf.Exp10(x) - TSelf.One;
src\libraries\System.Private.CoreLib\src\System\Numerics\IFloatingPointIeee754.cs (3)
81static virtual TSelf Lerp(TSelf value1, TSelf value2, TSelf amount) => TSelf.MultiplyAddEstimate(value1, TSelf.One - amount, value2 * amount); 86static virtual TSelf ReciprocalEstimate(TSelf x) => TSelf.One / x; 91static virtual TSelf ReciprocalSqrtEstimate(TSelf x) => TSelf.One / TSelf.Sqrt(x);
src\libraries\System.Private.CoreLib\src\System\Numerics\ILogarithmicFunctions.cs (3)
26static virtual TSelf LogP1(TSelf x) => TSelf.Log(x + TSelf.One); 36static virtual TSelf Log2P1(TSelf x) => TSelf.Log2(x + TSelf.One); 46static virtual TSelf Log10P1(TSelf x) => TSelf.Log10(x + TSelf.One);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1281/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
626/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1029/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1436/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
568/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
607/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
606/// <inheritdoc cref="INumberBase{TSelf}.One" />
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
609/// <inheritdoc cref="INumberBase{TSelf}.One" />
System.Private.Windows.Core.TestUtilities (13)
XUnit\TestData.cs (13)
41T.One, 44T.MaxValue / (T.One + T.One), 61T.One, 62T.MaxValue / (T.One + T.One) 68T.One, 70T.Zero - T.One, 71T.MaxValue / (T.One + T.One) 80T.Zero, T.MaxValue, T.One, T.MaxValue / (T.One + T.One)
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
928/// <inheritdoc cref="INumberBase{TSelf}.One" />
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
119if (Interlocked.CompareExchange(ref state.NextAvailable, element + T.One, element) != element)