Пример #1
0
Файл: int128.cs Проект: sgf/SCTP
 public static Int128 Cube(long a)
 {
     Int128 c;
     if (a < 0)
     {
         UInt128.Cube(out c.v, (ulong)(-a));
         UInt128.Negate(ref c.v);
     }
     else
         UInt128.Cube(out c.v, (ulong)a);
     return c;
 }
Пример #2
0
Файл: int128.cs Проект: sgf/SCTP
 public static Int128 Cube(Int128 a)
 {
     Int128 c;
     if (a < 0)
     {
         UInt128 aneg;
         UInt128.Negate(out aneg, ref a.v);
         UInt128.Cube(out c.v, ref aneg);
         UInt128.Negate(ref c.v);
     }
     else
         UInt128.Cube(out c.v, ref a.v);
     return c;
 }