static float[] doubleArrayToFloatArray(double[] a) { int n = lDoubleArray(a); float[] b = new[n]; for i to n: b[i] = (float) a[i]; ret b; }