Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0004512 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2008-07-25 18:13 | 2009-04-21 12:18 | |||
Reporter | omlaverde | View Status | public | |||||
Assigned To | vmromanos | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 11777 | ||||
Projection | none | ETA | none | Target Version | 2.50 | |||
OS | Any | Database | Any | Java version | 1.6.0_04 | |||
OS Version | Database version | Ant version | 1.7.0 | |||||
Product Version | pi | SCM revision | 5987 | |||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0004512: Float Point Errors | |||||||
Description | Double and float operations don't have required precision. Test this java code: String a="0.28"; System.out.println("Error="+Double.parseDouble("0.28")*100D); System.out.println("OK="+new BigDecimal(a).multiply(new BigDecimal(100))); System out: Error=28.000000000000004 OK=28.00 Condition return false: Double.parseDouble("0.28")*100D == 28D And others errors ... | |||||||
Steps To Reproduce | Search double,float in java code without Case sensitive in src directory. - double 473 hits. - float 75 hits. | |||||||
Proposed Solution | Change all double, float, Double, Float types to BigDecimal. Change all operators (+,-,/,*) to BigDecimal methods. - double 473 hits. - float 75 hits. | |||||||
Tags | GPS-Top20 | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0008405) omlaverde (reporter) 2008-07-25 20:51 |
Please read this: http://www.ibm.com/developerworks/java/library/j-jtp0114/ [^] |
(0008748) plujan (manager) 2008-08-26 12:59 |
Severity changed to major. Please put special attention to those double and float variables that can lead to rounding errors. For more information, see: https://sourceforge.net/forum/message.php?msg_id=5127475 [^] |
(0009070) manjuka (reporter) 2008-09-18 11:55 |
Also suggest changing database column types to DECIMAL with precision 2 (or more where needed) |
(0011822) svnbot (reporter) 2008-12-31 17:14 |
Repository: openbravo Revision: 11627 Author: vmromanos Date: 2008-12-31 17:14:52 +0100 (Wed, 31 Dec 2008) Issue 4512: Float Point Errors --- U trunk/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java U trunk/src/org/openbravo/erpCommon/ad_forms/DocPayment.java U trunk/src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java U trunk/src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java U trunk/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java --- https://dev.openbravo.com/websvn/openbravo/?rev=11627&sc=1 [^] |
(0011961) svnbot (reporter) 2009-01-07 18:39 |
Repository: openbravo Revision: 11692 Author: vmromanos Date: 2009-01-07 18:39:04 +0100 (Wed, 07 Jan 2009) Issue 4512: Float Point Errors --- U trunk/src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Conversion_Rate.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_CreateFromMultiple_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_CreateLines_Conversion_UOM.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_GlobalUse_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_InOut_BPartner.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_InOut_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Internal_Consumption_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_InvoiceTax_Amt.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Order_DocType.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Production_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Project_Margin.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_Project_Planned.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Amt.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java U trunk/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java U trunk/src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java U trunk/src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java U trunk/src/org/openbravo/erpCommon/ad_process/ImportOrder.java U trunk/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java U trunk/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java U trunk/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java --- https://dev.openbravo.com/websvn/openbravo/?rev=11692&sc=1 [^] |
(0011999) svnbot (reporter) 2009-01-08 17:30 |
Repository: openbravo Revision: 11723 Author: vmromanos Date: 2009-01-08 17:30:13 +0100 (Thu, 08 Jan 2009) Issue 4512: Float Point Errors --- U trunk/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java U trunk/src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java U trunk/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java U trunk/src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegisters.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartner.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_MachineCost.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_SequenceProduct_Conversion.java U trunk/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java U trunk/src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java U trunk/src/org/openbravo/erpCommon/ad_reports/ReportProjectProgress.java U trunk/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java --- https://dev.openbravo.com/websvn/openbravo/?rev=11723&sc=1 [^] |
(0012008) svnbot (reporter) 2009-01-08 19:25 |
Repository: openbravo Revision: 11729 Author: vmromanos Date: 2009-01-08 19:25:30 +0100 (Thu, 08 Jan 2009) Issue 4512: Float Point Errors --- U trunk/src/org/openbravo/erpCommon/businessUtility/AccountTree.java --- https://dev.openbravo.com/websvn/openbravo/?rev=11729&sc=1 [^] |
(0012009) svnbot (reporter) 2009-01-08 19:26 |
Repository: openbravo Revision: 11730 Author: vmromanos Date: 2009-01-08 19:26:41 +0100 (Thu, 08 Jan 2009) Fixed bug 4512: Float Point Errors --- U trunk/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesImpl.java U trunk/src/org/openbravo/erpCommon/ws/externalSales/OrderLine.java U trunk/src/org/openbravo/erpCommon/ws/externalSales/Payment.java U trunk/src/org/openbravo/erpCommon/ws/externalSales/Product.java U trunk/src/org/openbravo/erpCommon/ws/externalSales/ProductPlus.java U trunk/src/org/openbravo/erpCommon/ws/externalSales/Tax.java --- https://dev.openbravo.com/websvn/openbravo/?rev=11730&sc=1 [^] |
(0012055) svnbot (reporter) 2009-01-09 17:28 |
Repository: openbravo Revision: 11777 Author: vmromanos Date: 2009-01-09 17:28:29 +0100 (Fri, 09 Jan 2009) Issue 4512: Float Point Errors --- U trunk/src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Amount.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Product.java U trunk/src/org/openbravo/erpCommon/ad_callouts/SL_InvoiceTax_Amt.java U trunk/src/org/openbravo/erpCommon/ad_forms/DocPayment.java --- https://dev.openbravo.com/websvn/openbravo/?rev=11777&sc=1 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2008-07-25 18:13 | omlaverde | New Issue | |
2008-07-25 18:13 | omlaverde | Assigned To | => cromero |
2008-07-25 18:13 | omlaverde | sf_bug_id | 0 => 2027982 |
2008-07-25 20:51 | omlaverde | Note Added: 0008405 | |
2008-07-30 10:59 | psarobe | Severity | critical => minor |
2008-07-30 11:00 | psarobe | Status | new => scheduled |
2008-07-30 11:00 | psarobe | Assigned To | cromero => gorka_gil |
2008-07-30 11:00 | psarobe | fix_in_branch | => trunk |
2008-08-20 16:58 | iperdomo | Assigned To | gorka_gil => vmromanos |
2008-08-26 12:59 | plujan | Note Added: 0008748 | |
2008-08-26 12:59 | plujan | Severity | minor => major |
2008-08-26 12:59 | plujan | fix_in_branch | trunk => |
2008-09-02 13:06 | cromero | Target Version | => 2.50 |
2008-09-18 11:55 | manjuka | Note Added: 0009070 | |
2008-09-30 13:07 | pjuvara | Tag Attached: GPS-Top20 | |
2008-12-03 19:03 | pjuvara | Priority | normal => high |
2008-12-10 10:27 | rafaroda | Relationship added | related to 0006284 |
2008-12-31 17:14 | svnbot | Checkin | |
2008-12-31 17:14 | svnbot | Note Added: 0011822 | |
2008-12-31 17:14 | svnbot | svn_revision | => 11627 |
2009-01-07 15:43 | mtaal | Relationship replaced | has duplicate 0006284 |
2009-01-07 18:39 | svnbot | Checkin | |
2009-01-07 18:39 | svnbot | Note Added: 0011961 | |
2009-01-07 18:39 | svnbot | svn_revision | 11627 => 11692 |
2009-01-08 17:30 | svnbot | Checkin | |
2009-01-08 17:30 | svnbot | Note Added: 0011999 | |
2009-01-08 17:30 | svnbot | svn_revision | 11692 => 11723 |
2009-01-08 19:25 | svnbot | Checkin | |
2009-01-08 19:25 | svnbot | Note Added: 0012008 | |
2009-01-08 19:25 | svnbot | svn_revision | 11723 => 11729 |
2009-01-08 19:26 | svnbot | Checkin | |
2009-01-08 19:26 | svnbot | Note Added: 0012009 | |
2009-01-08 19:26 | svnbot | Status | scheduled => resolved |
2009-01-08 19:26 | svnbot | Resolution | open => fixed |
2009-01-08 19:26 | svnbot | svn_revision | 11729 => 11730 |
2009-01-09 17:28 | svnbot | Checkin | |
2009-01-09 17:28 | svnbot | Note Added: 0012055 | |
2009-01-09 17:28 | svnbot | svn_revision | 11730 => 11777 |
2009-01-09 18:22 | vmromanos | Relationship added | related to 0006477 |
2009-03-12 16:35 | shuehner | Relationship added | related to 0008098 |
2009-04-21 12:18 | psarobe | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |