Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8013058

Make BigDecimal a Primitive Data Type

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7
    • core-libs
    • None

      A DESCRIPTION OF THE REQUEST :
      The main advantage of Cobol over Java in financial applications is that Cobol supports packed decimal as a native type. Java supports packed decimal with the BigDecimal class, but its usage is cumbersome, i.e. you need method calls to calculate with BigDecimal numbers.

      Instead Java should support packed decimal as primitive data type, the mathematical operations should be usable for decimal in the same way as with float.
      E.g.

      decimal d = 2500 * 0.05d;

      for a description of Cobol packed decimal see http://www.simotime.com/datapk01.htm

      JUSTIFICATION :
      In order to replace Cobol in financial applications with Java, the support for packed decimal should be in Java as good as in Cobol.

            darcy Joe Darcy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: