Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Writing IBM Mainframe floating point

by roboticus (Chancellor)
on Jul 20, 2018 at 14:19 UTC ( [id://1218914]=note: print w/replies, xml ) Need Help??


in reply to Writing IBM Mainframe floating point

caden varn:

It seems that the IBM Mainframes support multiple floating point formats. The wikipedia page shows the binary formats for them, and under "Special uses" mentions that SAS 5 Transport files use an IBM format rather than the IEEE format.

It looks like a relatively simple format* so you should be able to convert between them with a little bit of bit masks, shifts, and such.

Note: Relatively simple in that there are few fields, and that the IEEE-754 page and the IBM floating point page describes them fully. However, you'll still have to decide what to do in the oddball cases: NaN, *Inf, exponents out of range, deciding how to handle the extra/missing mantissa bits, etc.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: Writing IBM Mainframe floating point

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1218914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found