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; }
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; }