code: public static String getSDbl( double Value, int DecPrec ) {
  		//
  		String Result = "";
  		//
  		if ( Double.isNaN( Value ) ) return "NaN";
  		//
  		if ( DecPrec < 0 ) DecPrec = 0;
  		//
  		String DFS = "###,###,##0";
  		//
  		if ( DecPrec > 0 ) {
  			int idx = 0;
  			DFS += ".";
  			while ( idx < DecPrec ) {
  				DFS = DFS + "0";
  				idx ++;
  				if ( idx > 100 ) break;
  			}
  		}
  		//
  //		Locale locale  = new Locale("en", "UK");
  		//
  		DecimalFormatSymbols DcmFrmSmb = new DecimalFormatSymbols( Locale.getDefault());
  		DcmFrmSmb.setDecimalSeparator('.');
  		DcmFrmSmb.setGroupingSeparator(' ');
  		//
  		DecimalFormat DcmFrm;
  		//
  		DcmFrm = new DecimalFormat( DFS, DcmFrmSmb );
  		//
  	//	DcmFrm.setGroupingSize( 3 );
  		//
  		Result = DcmFrm.format( Value );
  		//
  		return Result;
  	}
docs: <b>getSDbl</b><br>
  public static String getSDbl( double Value, int DecPrec )<br>
  Returns double converted to string.<br>
  If Value is Double.NaN returns "NaN".<br>
  If DecPrec is < 0 is DecPrec set 0.<br>
  
  @param Value - value
  @param DecPrec - decimal precision
  @return double as string