IBM Support

The division result form in ora mode could be different from Oracle

Question & Answer


Question

The division result form in ora mode is exponent form while normal number form in Oracle. ====================================== db2 Oracle mode shows exponent form $ db2 "values (18964/1.1)" 1 ------------------------------------------                                   1.724E+4 ====================================== Oracle shows normal number form SQL> select (18964/1.1) from dual; (18964/1.1) ----------- € € € 17240 ======================================

Cause

Using number compatibility causes division operations to map to decfloat in DB2 Oracle mode in an attempt to replicate NUMBER operations on Oracle. Thus the result will be shown in exponent form and it follows the IEEE standard. The IEEE754r decimal float standard allows for multiple representations of the same value, these two results(1.724E+4 and 17240) are mathematically equivalent. 

Answer

The results form could be different but they are mathematically equivalent.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.8;9.7;10.1;10.5;11.1","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg22000595