Reply to post: Pi in the, er, print

Mature mainframe madness prints Mandlebrot fractal in TWELVE MINUTES

Primus Secundus Tertius

Pi in the, er, print

The IBM 1620 I once programmed used binary coded decimal arithmetic. That meant one could manipulate very long numbers. I used it to calculate pi to 300 places.

Part of that calculation involved finding the square root of three to 300 places, which entailed a loop in which a 600 place number was divided by a 300 place number. A single hardware divide instruction took about one second to do that, as shown by the flashing lights.

The real use of BCD is in finance, to represent billions of dollars to the nearest cent without rounding errors for simple addition and subtraction. Percentages and currency conversions still have to be rounded, of course. VAX computers included BCD instructions for use with their COBOL compilers and variables of type COMPUTATIONAL.

Nowadays this long-length arithmetic would be useful for cryptography.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon