public static String toNumber(double number){
  String str=(isFloatPrecision) ? Float.toString((float)number) : Double.toString(number);
  if (str.endsWith(".0")) {
    str=str.substring(0,str.length() - 2);
  }
  return str;
}

public static String toNumber ( double number ) { String str = ( isFloatPrecision ) ? Float . toString ( ( float ) number ) : Double . toString ( number ) ; if ( str . endsWith ( ".0" ) ) { str = str . substring ( 0 , str . length ( ) - 2 ) ; } return str ; }
returns a double array as a number attribute value .
