6 implementations of CopySign
System.Private.CoreLib (6)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
523static byte INumber<byte>.CopySign(byte value, byte sign) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1448static UInt128 INumber<UInt128>.CopySign(UInt128 value, UInt128 sign) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
528static ushort INumber<ushort>.CopySign(ushort value, ushort sign) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
593static uint INumber<uint>.CopySign(uint value, uint sign) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
600static ulong INumber<ulong>.CopySign(ulong value, ulong sign) => value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
599static nuint INumber<nuint>.CopySign(nuint value, nuint sign) => value;
51 references to CopySign
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\TensorOperation.cs (2)
887destination = T.CopySign(x, y); 897destination = T.CopySign(x, y);
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (1)
60public static T Invoke(T x, T y) => T.CopySign(x, y);
System.Private.CoreLib (18)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
522/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1238/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
978/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1704/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1209/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
609/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
651/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
648/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
671/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (1)
1299/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1180/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
588/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
973/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1447/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
527/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
592/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
599/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
598/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
System.Runtime.Numerics (30)
System\Numerics\BigInteger.cs (1)
4076/// <inheritdoc cref="INumber{TSelf}.CopySign(TSelf, TSelf)" />
System\Numerics\Complex.Generic.cs (29)
195a = T.CopySign(T.IsInfinity(a) ? T.One : T.Zero, a); 196b = T.CopySign(T.IsInfinity(b) ? T.One : T.Zero, b); 200c = T.CopySign(T.Zero, c); 205d = T.CopySign(T.Zero, d); 214c = T.CopySign(T.IsInfinity(c) ? T.One : T.Zero, c); 215d = T.CopySign(T.IsInfinity(d) ? T.One : T.Zero, d); 219a = T.CopySign(T.Zero, a); 224b = T.CopySign(T.Zero, b); 236a = T.CopySign(T.Zero, a); 241b = T.CopySign(T.Zero, b); 246c = T.CopySign(T.Zero, c); 251d = T.CopySign(T.Zero, d); 325T inf = T.CopySign(T.PositiveInfinity, c); 332a = T.CopySign(T.IsInfinity(a) ? T.One : T.Zero, a); 333b = T.CopySign(T.IsInfinity(b) ? T.One : T.Zero, b); 341c = T.CopySign(T.IsInfinity(c) ? T.One : T.Zero, c); 342d = T.CopySign(T.IsInfinity(d) ? T.One : T.Zero, d); 576re = T.IsNaN(re) || T.IsNaN(a) ? re : T.CopySign(re, a); 577im = T.IsNaN(im) || T.IsNaN(b) ? im : T.CopySign(im, b); 632return (real == T.Zero) ? new Complex<T>(T.NaN, T.CopySign(T.Zero, real)) : new Complex<T>(T.NaN, T.NaN); 772T re = T.CopySign(T.One, real); 778return new Complex<T>(re, T.CopySign(T.Zero, sin * cos)); 780return new Complex<T>(re, T.CopySign(T.Zero, imaginary)); 843re = T.IsNaN(re) || T.IsNaN(a) ? re : T.CopySign(re, a); 844im = T.IsNaN(im) || T.IsNaN(b) ? im : T.CopySign(im, b); 1025return new Complex<T>(T.Zero, T.CopySign(T.PositiveInfinity, imaginary)); 1029return new Complex<T>(T.PositiveInfinity, T.IsNaN(imaginary) ? T.NaN : T.CopySign(T.Zero, imaginary)); 1043return new Complex<T>(T.Zero, T.CopySign(T.Sqrt(-real), imaginary)); 1046return new Complex<T>(T.Sqrt(real), T.CopySign(T.Zero, imaginary));