Perl: the Markov chain saw | |
PerlMonks |
Re: Writing IBM Mainframe floating pointby roboticus (Chancellor) |
on Jul 20, 2018 at 14:19 UTC ( [id://1218914]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|