Here you can find the source of multiply(long[] x, long[] y, long[] z)
public static void multiply(long[] x, long[] y, long[] z)
//package com.java2s; public class Main { public static void multiply(long[] x, long[] y, long[] z) { long x0 = x[0], x1 = x[1]; long y0 = y[0], y1 = y[1]; long z0 = 0, z1 = 0, z2 = 0; for (int j = 0; j < 64; ++j) { long m0 = -(x0 & 1L); x0 >>>= 1;/* w w w . j a va2 s .c om*/ z0 ^= (y0 & m0); z1 ^= (y1 & m0); long m1 = -(x1 & 1L); x1 >>>= 1; z1 ^= (y0 & m1); z2 ^= (y1 & m1); long c = y1 >> 63; y1 = (y1 << 1) | (y0 >>> 63); y0 = (y0 << 1) ^ (c & 0x87L); } z0 ^= z2 ^ (z2 << 1) ^ (z2 << 2) ^ (z2 << 7); z1 ^= (z2 >>> 63) ^ (z2 >>> 62) ^ (z2 >>> 57); z[0] = z0; z[1] = z1; } }