56 references to CreateChecked
System.Linq (24)
System\Linq\Average.cs (18)
101return TResult.CreateChecked(Sum<TSource, TAccumulator>(span)) / TResult.CreateChecked(span.Length); 110TAccumulator sum = TAccumulator.CreateChecked(e.Current); 114checked { sum += TAccumulator.CreateChecked(e.Current); } 118return TResult.CreateChecked(sum) / TResult.CreateChecked(count); 148TAccumulator sum = TAccumulator.CreateChecked(value.GetValueOrDefault()); 156checked { sum += TAccumulator.CreateChecked(value.GetValueOrDefault()); } 161return TResult.CreateChecked(sum) / TResult.CreateChecked(count); 200TAccumulator sum = TAccumulator.CreateChecked(selector(e.Current)); 205checked { sum += TAccumulator.CreateChecked(selector(e.Current)); } 209return TResult.CreateChecked(sum) / TResult.CreateChecked(count); 244TAccumulator sum = TAccumulator.CreateChecked(value.GetValueOrDefault()); 252checked { sum += TAccumulator.CreateChecked(value.GetValueOrDefault()); } 257return TResult.CreateChecked(sum) / TResult.CreateChecked(count);
System\Linq\Select.SpeedOpt.cs (1)
282Debug.Assert(_start < _end - T.CreateChecked(index));
System\Linq\Sum.cs (5)
41checked { sum += TResult.CreateChecked(value); } 74checked { sum += TResult.CreateChecked(value); } 217checked { sum += TAccumulator.CreateChecked(value.GetValueOrDefault()); } 252checked { sum += TAccumulator.CreateChecked(selector(value)); } 288checked { sum += TAccumulator.CreateChecked(selectedValue); }
System.Numerics.Tensors (9)
System\Numerics\Tensors\netcore\Tensor.cs (4)
445span[i] = T.CreateChecked(Math.Sqrt(-2.0 * Math.Log(u1)) * Math.Sin(2.0 * Math.PI * u2)); 464span[i] = T.CreateChecked(random.NextDouble()); 2939T flattenedLength = T.CreateChecked(x.FlattenedLength); 5210T variance = result / T.CreateChecked(x.FlattenedLength);
System\Numerics\Tensors\netcore\TensorOperation.cs (2)
819destination = TTo.CreateChecked(x); 2623output[^1] = T.CreateChecked(-1);
System\Numerics\Tensors\netcore\TensorPrimitives.Average.cs (1)
28return Sum(x) / T.CreateChecked(x.Length);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertChecked.cs (1)
37public static TTo Invoke(TFrom x) => TTo.CreateChecked(x);
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
30T variance = sumSquaredDiff / T.CreateChecked(x.Length);
System.Private.CoreLib (21)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
561/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1313/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1045/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1759/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1294/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
675/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
716/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
713/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
708/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Numerics\IBinaryInteger.cs (2)
33TSelf bitCount = TSelf.CreateChecked(value!.GetByteCount() * 8L); 37return TSelf.CreateChecked(bitCount);
src\libraries\System.Private.CoreLib\src\System\Numerics\ITrigonometricFunctions.cs (2)
113return (degrees * TSelf.Pi) / TSelf.CreateChecked(180); 124return (radians * TSelf.CreateChecked(180)) / TSelf.Pi;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1293/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
638/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1042/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1448/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
580/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
619/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
618/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
621/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
4022/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
System\Numerics\Complex.cs (1)
940/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />