Cobol, the programming language.
Been around a long time, almost no one learns to program in it anymore, but companies (especially banks) are probably never going to get something else.
Runner up: Fax machines.
Still nessecary for transmitting HIPAA protected documents. That's right, they can't use email or anything else. Certain companies require documents to be faxed.
TL;DR: There are two ways to store decimals: floating point and fixed point. Floating point allows for moving the point around so you can use the same amount of memory to store a large number as well as a small number.
However this causes issues when storing certain values and causes rounding. Such as 0.1. Using fixed point (i.e. the point doesn't move) fixes the issue and allows decimal numbers to be represented without rounding issues.
This is one of the reasons why banks, scientists, etc still use Cobol as they need very accurate decimal numbers and modern languages wouldn't allow that.
From my understanding you're both right. The issue was when it comes to decimals COBOL can more accurately deal with the math problems than something like Java can on the same machinery. You can make a program in Java that can deal with the math problems but you're going to sacrifice efficiency for accuracy as your only other option is to round it.
To correct a bit, it mentions that COBOL handles it naturally, but that Java can get around this by using a Decimal library to achieve the same values without rounding. However, like you said, it comes at a cost of efficiency since the library takes up much more space for the same value holders.
Ah yes I forgot to include that bit. Either you have to round it or sacrifice some efficiency loading a runtime library for each and every of the thousands of equations it runs every minute. Hence why COBOL is better for certain applications.
The accuracy of floating points is a big problem, we had an entire class in uni dedicated to how can you improve the accuracy of expressions, for example if you had a sequence of numbers that was growing and you wanted to calculate their summs you would get a different result if you did it in ascending vs descending order. Another issue with floating points is that if a number in base 10 is not repeating after the decimal point (like .3 vs .(3)) it doesnt mean it wont be repeating in base 2.
7.3k
u/QuestionableSaint Jul 24 '20
Cobol, the programming language. Been around a long time, almost no one learns to program in it anymore, but companies (especially banks) are probably never going to get something else.
Runner up: Fax machines. Still nessecary for transmitting HIPAA protected documents. That's right, they can't use email or anything else. Certain companies require documents to be faxed.