private static float[] doubleToFloatArray(double[] doubles){
  float[] floats=new float[doubles.length];
  for (int i=0; i < doubles.length; i++) {
    floats[i]=(float)doubles[i];
  }
  return floats;
}

private static float [ ] doubleToFloatArray ( double [ ] doubles ) { float [ ] floats = new float [ doubles . length ] ; for ( int i = 0 ; i < doubles . length ; i ++ ) { floats [ i ] = ( float ) doubles [ i ] ; } return floats ; }
convert a double array into a float array
