Search code examples
floating-pointprogramming-languagesprecisioncurrency

Programmer's tale about float and double datatypes


I've heard a story some years ago about how using the float datatype (instead of double or, even better, big integers) broke some stock market company because of precision. The financial results were calculated out of precision and were showing some nice result, but in reality the company(?) was broken. It could be a bank, though.

Does anyone know about this story? If yes, where could I find more details? I cannot remember enough details to do a proper search in the internet.


Solution

  • Vancouver Stock Exchange

    Index was initialized at 1000 and subsequently updated and truncated to three decimal places on each trade.