25 implementations of IsZero
System.Private.CoreLib (22)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
662
static bool INumberBase<byte>.
IsZero
(byte value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1542
static bool INumberBase<char>.
IsZero
(char value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1420
static bool INumberBase<decimal>.
IsZero
(decimal value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1151
static bool INumberBase<double>.
IsZero
(double value) => IsZero(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1845
static bool INumberBase<Half>.
IsZero
(Half value) => IsZero(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1390
static bool INumberBase<Int128>.
IsZero
(Int128 value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
762
static bool INumberBase<short>.
IsZero
(short value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
804
static bool INumberBase<int>.
IsZero
(int value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
801
static bool INumberBase<long>.
IsZero
(long value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
820
static bool INumberBase<nint>.
IsZero
(nint value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1488
static bool INumberBase<BFloat16>.
IsZero
(BFloat16 value) => IsZero(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
927
static bool INumberBase<Decimal128>.
IsZero
(Decimal128 value) => Number.IsZeroDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
951
static bool INumberBase<Decimal32>.
IsZero
(Decimal32 value) => Number.IsZeroDecimalIeee754<Decimal32, uint>(value._value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
942
static bool INumberBase<Decimal64>.
IsZero
(Decimal64 value) => Number.IsZeroDecimalIeee754<Decimal64, ulong>(value._value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1302
static bool INumberBase<NFloat>.
IsZero
(NFloat value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
741
static bool INumberBase<sbyte>.
IsZero
(sbyte value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1168
static bool INumberBase<float>.
IsZero
(float value) => IsZero(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1585
static bool INumberBase<UInt128>.
IsZero
(UInt128 value) => (value == 0U);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
667
static bool INumberBase<ushort>.
IsZero
(ushort value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
732
static bool INumberBase<uint>.
IsZero
(uint value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
739
static bool INumberBase<ulong>.
IsZero
(ulong value) => (value == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
734
static bool INumberBase<nuint>.
IsZero
(nuint value) => (value == 0);
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (1)
4239
static bool INumberBase<BigInteger>.
IsZero
(BigInteger value)
System\Numerics\Complex.cs (1)
675
static bool INumberBase<Complex>.
IsZero
(Complex value) => (value.m_real == 0.0) && (value.m_imaginary == 0.0);
System\Numerics\Complex.Generic.cs (1)
885
static bool INumberBase<Complex<T>>.
IsZero
(Complex<T> value) => (value.m_real == T.Zero) && (value.m_imaginary == T.Zero);
70 references to IsZero
System.Linq (1)
System\Linq\Sequence.cs (1)
61
if (T.
IsZero
(step))
System.Linq.AsyncEnumerable (1)
System\Linq\Sequence.cs (1)
61
if (T.
IsZero
(step))
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (1)
49
public static bool Invoke(T x) => T.
IsZero
(x);
System.Private.CoreLib (62)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (2)
132
if (T.
IsZero
(value))
152
if (T.IsNegative(value) || T.
IsZero
(value))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
661
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1541
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1419
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
1590
if (TNumber.
IsZero
(input))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1150
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1844
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1389
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
761
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
803
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
800
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
819
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.cs (32)
428
if (TValue.
IsZero
(significand))
648
bool aZero = TValue.
IsZero
(a.Significand);
649
bool bZero = TValue.
IsZero
(b.Significand);
723
sticky = !TValue.
IsZero
(remainder);
748
int comparison = !TValue.
IsZero
(magnitudeHigh) ? 1 : magnitudeLow.CompareTo(loRetained);
763
if (TValue.
IsZero
(magnitudeLow))
785
if (TValue.
IsZero
(magnitudeHigh) && TValue.
IsZero
(magnitudeLow) && !sticky)
855
bool otherZero = (leftInfinity && !rightInfinity && TValue.
IsZero
(UnpackDecimalIeee754<TDecimal, TValue>(right).Significand))
856
|| (rightInfinity && !leftInfinity && TValue.
IsZero
(UnpackDecimalIeee754<TDecimal, TValue>(left).Significand));
874
if (TValue.
IsZero
(a.Significand) || TValue.
IsZero
(b.Significand))
946
if (TValue.
IsZero
(b.Significand))
950
if (TValue.
IsZero
(a.Significand))
961
if (TValue.
IsZero
(a.Significand))
993
bool remainderNonZero = !TValue.
IsZero
(remainder);
1005
if (!TValue.
IsZero
(digit))
1106
if (TValue.
IsZero
(high))
1156
while (!TValue.
IsZero
(high))
1236
Debug.Assert(TValue.
IsZero
(high));
1251
if (TValue.
IsZero
(high) && TValue.
IsZero
(low))
1402
if (TValue.
IsZero
(significand))
1432
if (!TValue.
IsZero
(remainder))
1471
return TValue.
IsZero
(decoded.Significand);
1532
if (TValue.
IsZero
(decoded.Significand))
1556
if (TValue.
IsZero
(decoded.Significand))
1763
if (TDecimal.IsFinite(decimalBits) && TValue.
IsZero
(UnpackDecimalIeee754<TDecimal, TValue>(decimalBits).Significand))
1869
bool isUnsigned = TInteger.
IsZero
(TInteger.MinValue);
2045
if (TSourceValue.
IsZero
(decoded.Significand))
2078
if (TValue.
IsZero
(decoded.Significand))
2169
if (TValue.
IsZero
(decoded.Significand))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (1)
492
if (TValue.
IsZero
(unpackDecimal.Significand))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1487
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
926
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
950
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
941
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\IBinaryInteger.cs (3)
32
if (TSelf.
IsZero
(remainder))
116
if (TSelf.
IsZero
(remainder))
194
if (TSelf.
IsZero
(remainder))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\TotalOrderIeee754Comparer.cs (1)
112
if (T.
IsZero
(x)) // only zeros are equal to zeros
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1301
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
740
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1167
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1584
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
666
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
731
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
738
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
733
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
System.Private.Windows.Core.TestUtilities (2)
ComparisonHelpers.cs (2)
109
static unsafe bool IsNegativeZero(T value) => T.
IsZero
(value) && T.IsNegative(value);
111
static unsafe bool IsPositiveZero(T value) => T.
IsZero
(value) && T.IsPositive(value);
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (1)
4238
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
System\Numerics\Complex.cs (1)
674
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />
System\Numerics\Complex.Generic.cs (1)
884
/// <inheritdoc cref="INumberBase{TSelf}.
IsZero
(TSelf)" />