context: qx.Proto.format = function(num) {  var NumberFormat = qx.util.format.NumberFormat;  var negative = (num < 0);  if (negative) {    num = -num;  }  if (this.getMaximumFractionDigits() != null) {    // Do the rounding    var mover = Math.pow(10, this.getMaximumFractionDigits());    num = Math.round(num * mover) / mover;  }    if (num != 0) { // Math.log(0) = -Infinity    var integerDigits = Math.max(parseInt(Math.log(num) / Math.LN10) + 1, 1);  } else {    integerDigits = 1;  }  var numStr = "" + num;  // Prepare the integer part  var integerStr = numStr.substring(0, integerDigits);  while (integerStr.length < this.getMinimumIntegerDigits()) {    integerStr = "0" + integerStr;  }  if (this.getMaximumIntegerDigits() != null && integerStr.length > this.getMaximumIntegerDigits()) {    // NOTE: We cut off even though we did rounding before, because there    //     may be rounding errors ("12.24000000000001" -> "12.24")    integerStr = integerStr.substring(integerStr.length - this.getMaximumIntegerDigits());  }  // Prepare the fraction part  var fractionStr = numStr.substring(integerDigits + 1);  while (fractionStr.length < this.getMinimumFractionDigits()) {    fractionStr += "0";  }  if (this.getMaximumFractionDigits() != -1 && fractionStr.length > this.getMaximumFractionDigits()) {    // We have already rounded -> Just cut off the rest    fractionStr = fractionStr.substring(0, this.getMaximumFractionDigits());  }  // Add the thousand groupings  if (this.getGroupingUsed()) {    var origIntegerStr = integerStr;    integerStr = "";    var groupPos;    for (groupPos = origIntegerStr.length; groupPos > 3; groupPos -= 3) {      integerStr = NumberFormat.GROUPING_SEPARATOR        + origIntegerStr.substring(groupPos - 3, groupPos) + integerStr;    }    integerStr = origIntegerStr.substring(0, groupPos) + integerStr;  }  // Workaround: prefix and postfix are null even their defaultValue is "" and  //             allowNull is set to false?!?  var prefix  = this.getPrefix()  ? this.getPrefix()  : "";  var postfix = this.getPostfix() ? this.getPostfix() : "";  // Assemble the number  var str = prefix + (negative ? "-" : "") + integerStr;  if (fractionStr.length > 0) {    str += NumberFormat.DECIMAL_SEPARATOR + fractionStr;  }  str += postfix;  return str;}
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/39d0b37ecea977e1e398da8b763c9946e8d6e876/NumberFormat.js/buggy/qooxdoo/frontend/framework/source/class/qx/util/format/NumberFormat.js