public void testComplexDoubleLargeArrayArraycopy()
    {
        double[] data = new double[]{1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10};
        int startPos = 1;
        int length = 3;
        LargeArray.setMaxSizeOf32bitArray(1073741824);
        ComplexDoubleLargeArray a = new ComplexDoubleLargeArray(data);
        ComplexDoubleLargeArray b = new ComplexDoubleLargeArray(2 * data.length);
        Utilities.arraycopy(a, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[2 * (startPos + i)], b.getComplexDouble(i)[0], 0.0);
            assertEquals(data[2 * (startPos + i) + 1], b.getComplexDouble(i)[1], 0.0);
        }
        b = new ComplexDoubleLargeArray(2 * data.length);
        Utilities.arraycopy(data, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[2 * (startPos + i)], b.getComplexDouble(i)[0], 0.0);
            assertEquals(data[2 * (startPos + i) + 1], b.getComplexDouble(i)[1], 0.0);
        }
        LargeArray.setMaxSizeOf32bitArray(data.length - 1);
        a = new ComplexDoubleLargeArray(data);
        b = new ComplexDoubleLargeArray(2 * data.length);
        Utilities.arraycopy(a, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[2 * (startPos + i)], b.getComplexDouble(i)[0], 0.0);
            assertEquals(data[2 * (startPos + i) + 1], b.getComplexDouble(i)[1], 0.0);
        }
        b = new ComplexDoubleLargeArray(2 * data.length);
        Utilities.arraycopy(data, startPos, b, 0, length);
        for (int i = 0; i < length; i++) {
            assertEquals(data[2 * (startPos + i)], b.getComplexDouble(i)[0], 0.0);
            assertEquals(data[2 * (startPos + i) + 1], b.getComplexDouble(i)[1], 0.0);
        }
    }