JDK-4330671 : Bug in formatting large double values with more than.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-04-14
  • Updated: 2000-05-03
  • Resolved: 2000-05-03
Related Reports
Duplicate :  
Description

Name: stC104175			Date: 04/14/2000


Java Version JDK 1.2.2



Formatting large double values with java.text.FormatDecimal changes the value
that should be formatted. (see Screenshot).
Formatting is done by

  void input_focusLost(FocusEvent e) {
    DecimalFormatSymbols symbols = new DecimalFormatSymbols();
    DecimalFormat decForm = new DecimalFormat("###,###,###.00", symbols);
    output.setText(decForm.format( new Float(input.getText()).floatValue()));
  }

if you enter:
'666333999000' the result is
666,334,003,200.00
(Review ID: 103694) 
======================================================================