IBM Support

RS02851: DIFFERENCE ON HOW DOUBLES ARE CONVERTED TO BIGDECIMAL OBJECTS IN CRE AND DE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The computation is done differently in CRE vs DE.  To avoid
    confusion in seeing this difference in behavior, we request to
    have documentation to state this in knowledge center.
    The computation is done in CRE by the following</span>
    statement: new</span> java.math.BigDecimal(java.lang.Double.
    toString(java.lang.Math.exp(<b>value</b></span>.doubleValue())))
    ;</span>
    And in DE by: scoreResponse.cpScore = new</span> java.math.
    BigDecimal(Math.exp(<b>value</b>.doubleValue()));</span>
    There is a difference on how doubles are converted to
    BigDecimal</span> objects. There is no particular reason for
    this. Converting a double to</span> a String or a BigDecimal is
    most of the time unpredictable anyway as</span> soon as there
    is a fractional part. When someone is doing this kind of</span>
    manipulations (in this case doing conversions to call Math.exp()
     or</span> other functions that doesn't exist for BigDecimal),
    he or she should control</span> explicitly the precision and
    the rounding method. </span>
    

Local fix

Problem summary

  • This is a documentation issue relating the difference on how
    doubles are converted to BigDecimal objects in Classic rule
    engine and Decision engine.
    

Problem conclusion

  • The documentation is updated.
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS02851

  • Reported component name

    WDS FOR RULES

  • Reported component ID

    5725B6903

  • Reported release

    881

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-08-17

  • Closed date

    2017-09-18

  • Last modified date

    2017-09-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • 999
    

Fix information

  • Fixed component name

    WDS FOR RULES

  • Fixed component ID

    5725B6903

Applicable component levels

  • R881 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"881","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 February 2022