16 implementations of One
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
550
static byte INumberBase<byte>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1428
static char INumberBase<char>.
One
=> (char)1;
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1299
static decimal INumberBase<decimal>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1033
static double INumberBase<double>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
664
static short INumberBase<short>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
705
static int INumberBase<int>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
702
static long INumberBase<long>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
697
static nint INumberBase<nint>.
One
=> 1;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1282
static NFloat INumberBase<NFloat>.
One
=> new NFloat(NativeType.One);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
627
static sbyte INumberBase<sbyte>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1030
static float INumberBase<float>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
569
static ushort INumberBase<ushort>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
608
static uint INumberBase<uint>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
607
static ulong INumberBase<ulong>.
One
=> One;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
610
static nuint INumberBase<nuint>.
One
=> 1;
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
929
static 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)
1756
destination = T.
One
/ x;
1840
destination = T.
One
/ (T.
One
+ T.Exp(-x));
System\Numerics\Tensors\netcore\TensorPrimitives.DivRem.cs (1)
102
public static T RemainderMaskValue => T.
One
;
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (2)
75
public static T Invoke(T x) => T.
One
/ x;
84
public static T Invoke(T x) => T.
One
/ T.Sqrt(x);
System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs (8)
40
public static T Invoke(T x) => T.
One
/ (T.
One
+ T.Exp(-x));
41
public static Vector128<T> Invoke(Vector128<T> x) => Vector128.Create(T.
One
) / (Vector128.Create(T.
One
) + ExpOperator<T>.Invoke(-x));
42
public static Vector256<T> Invoke(Vector256<T> x) => Vector256.Create(T.
One
) / (Vector256.Create(T.
One
) + ExpOperator<T>.Invoke(-x));
43
public 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)
429
overflow |= TInteger.IsGreaterThanAsUnsigned(answer, TInteger.MaxValue + (isNegative ? TInteger.
One
: TInteger.Zero));
src\libraries\System.Private.CoreLib\src\System\Numerics\IBinaryInteger.cs (1)
40
return TSelf.IsNegative(value) ? TSelf.Zero : ((bitCount - TSelf.
One
) ^ TSelf.Log2(value));
src\libraries\System.Private.CoreLib\src\System\Numerics\IExponentialFunctions.cs (3)
20
static virtual TSelf ExpM1(TSelf x) => TSelf.Exp(x) - TSelf.
One
;
30
static virtual TSelf Exp2M1(TSelf x) => TSelf.Exp2(x) - TSelf.
One
;
40
static virtual TSelf Exp10M1(TSelf x) => TSelf.Exp10(x) - TSelf.
One
;
src\libraries\System.Private.CoreLib\src\System\Numerics\IFloatingPointIeee754.cs (3)
81
static virtual TSelf Lerp(TSelf value1, TSelf value2, TSelf amount) => TSelf.MultiplyAddEstimate(value1, TSelf.
One
- amount, value2 * amount);
86
static virtual TSelf ReciprocalEstimate(TSelf x) => TSelf.
One
/ x;
91
static virtual TSelf ReciprocalSqrtEstimate(TSelf x) => TSelf.
One
/ TSelf.Sqrt(x);
src\libraries\System.Private.CoreLib\src\System\Numerics\ILogarithmicFunctions.cs (3)
26
static virtual TSelf LogP1(TSelf x) => TSelf.Log(x + TSelf.
One
);
36
static virtual TSelf Log2P1(TSelf x) => TSelf.Log2(x + TSelf.
One
);
46
static 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)
41
T.
One
,
44
T.MaxValue / (T.
One
+ T.
One
),
61
T.
One
,
62
T.MaxValue / (T.
One
+ T.
One
)
68
T.
One
,
70
T.Zero - T.
One
,
71
T.MaxValue / (T.
One
+ T.
One
)
80
T.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)
119
if (Interlocked.CompareExchange(ref state.NextAvailable, element + T.
One
, element) != element)