9 implementations of Abs
System.Private.CoreLib (7)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
554
static byte INumberBase<byte>.
Abs
(byte value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1491
static char INumberBase<char>.
Abs
(char value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1479
static UInt128 INumberBase<UInt128>.
Abs
(UInt128 value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
559
static ushort INumberBase<ushort>.
Abs
(ushort value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
624
static uint INumberBase<uint>.
Abs
(uint value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
631
static ulong INumberBase<ulong>.
Abs
(ulong value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
630
static nuint INumberBase<nuint>.
Abs
(nuint value) => value;
System.Runtime.Numerics (2)
System\Numerics\Complex.cs (1)
523
static Complex INumberBase<Complex>.
Abs
(Complex value) => Abs(value);
System\Numerics\Complex.Generic.cs (1)
1185
static Complex<T> INumberBase<Complex<T>>.
Abs
(Complex<T> value) => Abs(value);
42 references to Abs
System.Numerics.Tensors (5)
System\Numerics\Tensors\netcore\TensorOperation.cs (3)
522
destination = T.
Abs
(x);
2133
T diff = T.
Abs
(x - y);
2141
T diff = T.
Abs
(x[i] - y);
System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs (1)
45
public static T Invoke(T x) => T.
Abs
(x);
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
44
diff = T.
Abs
(diff); // only relevant to non-vectorizable types
System.Private.CoreLib (20)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
553
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1490
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1278
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1059
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1806
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1269
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
653
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
695
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
692
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
715
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Rounding.cs (1)
58
TNumber av = TNumber.
Abs
(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1395
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1217
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
632
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1054
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1478
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
558
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
623
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
630
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
629
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
System.Private.Windows.Core.TestUtilities (3)
ComparisonHelpers.cs (2)
16
return T.
Abs
(x > y ? x - y : y - x) <= variance;
107
return T.
Abs
(x > y ? x - y : y - x) <= variance;
XUnit\FloatingPointToleranceComparerer.cs (1)
18
public FloatingPointToleranceComparerer(T tolerance) => _tolerance = T.
Abs
(tolerance);
System.Runtime.Numerics (14)
System\Numerics\Complex.cs (1)
522
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
System\Numerics\Complex.Generic.cs (13)
293
if (T.
Abs
(d) < T.
Abs
(c))
519
Asin_Internal(T.
Abs
(value.Real), T.
Abs
(value.Imaginary), out T b, out T bPrime, out T v);
549
T absB = T.
Abs
(b);
646
Asin_Internal(T.
Abs
(value.Real), T.
Abs
(value.Imaginary), out T b, out T bPrime, out T v);
675
T absY = T.
Abs
(y);
745
if (T.
Abs
(value.m_imaginary) <= T.CreateChecked(4))
812
T absB = T.
Abs
(b);
1055
if ((T.
Abs
(realCopy) >= s_sqrtRescaleThreshold) || (T.
Abs
(imaginaryCopy) >= s_sqrtRescaleThreshold))
1184
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />