Emulate IBM Multiply / Add Floating Point in VBA

I am trying to imitate a mainframe report generator (no longer existing) in an Access 2003 or Access 2010 environment. The data it generates must exactly match paper reports from the beginning of the 70s. Unfortunately, data from the earliest years was run on hardware that used IBM's floating point view instead of IEEE. With Google, I found a library of VBA functions that converts a float from decimal to IEEE 754 binary. I had to modify the library to accept 32-bit or 64-bit floats, so I have a modest knowledge of floating point formats, however I'm having problems converting from the IEEE binary format to IBM, as well as the ability to multiply and add either IBM or the IEEE number.

I did not have any other libraries to perform these conversions and arithmetic operations in VBA - is there an easier way to do this or an existing library that I cannot find? Otherwise, a clear and direct explanation of the respective algorithms?

Thanks in advance.

+5
source share
2 answers

Honestly, you should probably start by looking at the Hercules emulator. http://www.hercules-390.org/ Besides theory in theory with VBA, you can use the decimal type to get good results (note that you need CDec to create them). uses 12 bits with a variable power of ten scalars.

google hercules, :

--- -

, . S/360 S/370 . FP ; - , Edit, Edit Mark. 360 (iirc/65 ) 370 (/155 ) , , - S/370 .

--- ---

, , hercules, , , , ( , ) .

+2

, , , .

, ( , ). , , .

, , , IEEE .

32- , :

-3.402823E38 
    to 
-1.401298E-45 for negative values

1.401298E-45 
    to 
3.402823E38 for positive values

, IEEE 754.

, , .

, Intel, Single Double Access, , IEEE.

- , , , , ?

. ( )

 ? hex(255)
     Above will show  FF

 ? csng(&hFF)
     Above will show 255

Edit:

, , , , . , IBM (Excess 64?), , . , , IBM , , ( = ).

, , , // . , , , . , , , ..

+1

All Articles