Mainframe

Post Reply
nighthalk
Posts: 41
Joined: Fri Jul 31, 2009 8:22 pm

Mainframe

Post by nighthalk »

this challenge doesnt seem to follow the IEEE-754 specifications, if you would note the two numbers -.22917763E-71 and .21482344E+74 have an exponential gap of 481 (in base 2), well above the 8 bit limit of 256, basically no matter what the bias is there is a floating point overflow that cant be stored in a single precision comp-1 decimal

and fyi, i STILL cant find a (free, working) compiler/interpreter for this thing that will take comp-1 (i found ones that dont support it blarg)
User avatar
Nick-Aotmzgin
Posts: 64
Joined: Sun Jun 14, 2009 11:01 am
Location: Microsoft Labs

Post by Nick-Aotmzgin »

emule asnd torrent softwares?-> mainframe compiler/interpreter,
here-> http://www.google.com/search?hl=en&q=ma ... f&oq=&aqi=
Cobol Cinii
www.cobug.com/cobug/docs/compilers0030.html
ci.nii.ac.jp/naid/110002673529/en
www.mainframesindia.com/
good luck. :idea:
(i) Hacerks Group -> Greek Hackers Group (House of Hackers Offical Community)
Zeta
Posts: 62
Joined: Thu Apr 16, 2009 3:37 pm

Post by Zeta »

you spotted a problem. Now the next questions you ask yourself are:
- What kind of mainframe is this program supposed to run on?
- How does it represent floating point numbers?

I'm not sure if there is a compiler which supports the needed floating point
representation if you can't let it run on the right hardware.
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

I think I can answer those questions. One is actually answered in the code.
- It's probably an IBM mainframe 370, but it doesn't matter!
- If you check the IBM Cobol documentation you'll notice there is the IEEE format and, guess what, IBM's own format (Remember: Cobol is 50 years old, and when it was created, there was nothing else).

If you look carefully enough, you'll find that IBM's format can describe bigger numbers than IEEE. But I could not yet find a description on how this format is translated into hex.

OpenCobol does not compile the code with some weird syntax error, other Cobol interpreters/compilers also did not succeed for me.

There are still some choices left:
- get mainframe access (unlikely)
- get a working Cobol interpreter/compiler which supports IBM COMP-1
- get the format description of IBM COMP-1 format and code the job barefoot

I keep trying...
Any other hint? :lol:
nighthalk
Posts: 41
Joined: Fri Jul 31, 2009 8:22 pm

Post by nighthalk »

got it ^_^ it was a little flakey with the last bit (rounding?) but i managed to get enough to solve it in excel, you definatly have to watch out for what formats you use on that system
User avatar
Nick-Aotmzgin
Posts: 64
Joined: Sun Jun 14, 2009 11:01 am
Location: Microsoft Labs

Post by Nick-Aotmzgin »

~~And it Solved~~
(i) Hacerks Group -> Greek Hackers Group (House of Hackers Offical Community)
jonik555
Posts: 43
Joined: Mon Aug 31, 2009 6:18 pm
Location: Prague

Post by jonik555 »

I'm doing it by hand. are all numbers usable? I used only those with small exponents and im getting answer Xxxx Xxx xx Xxx. I must probably try to somehow convert these ultra big resp. small values, am i right?
There are 10 types of people, those who understand ternary, those who think that this joke is about binary and the others.
Post Reply