8 implementations of Abs
System.Private.CoreLib (7)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
560
static byte INumberBase<byte>.
Abs
(byte value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1476
static char INumberBase<char>.
Abs
(char value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1483
static UInt128 INumberBase<UInt128>.
Abs
(UInt128 value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
565
static ushort INumberBase<ushort>.
Abs
(ushort value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
630
static uint INumberBase<uint>.
Abs
(uint value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
637
static ulong INumberBase<ulong>.
Abs
(ulong value) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
626
static nuint INumberBase<nuint>.
Abs
(nuint value) => value;
System.Runtime.Numerics (1)
System\Numerics\Complex.cs (1)
946
static Complex INumberBase<Complex>.
Abs
(Complex value) => Abs(value);
29 references to Abs
System.Numerics.Tensors (6)
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.Round.cs (1)
308
return T.
Abs
(x) < limit ?
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
44
diff = T.
Abs
(diff); // only relevant to non-vectorizable types
System.Private.CoreLib (19)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
559
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1475
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1286
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1063
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1755
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1278
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
666
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
708
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
705
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
718
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
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)
645
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1060
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1482
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
564
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
629
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
636
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
625
/// <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 (1)
System\Numerics\Complex.cs (1)
945
/// <inheritdoc cref="INumberBase{TSelf}.
Abs
(TSelf)" />