Lossless floating point calculations

Most modern computer languages and systems use the IEEE format for Floating Point. While efficient, these often require the programmers to write additional code in C/C++ that checks the Floating Point values against a predetermined value of EPSILON. This EPSILON value is small; for example, 0.00001. Its use is to help decide if two floating point numbers are equal. This is needed because the underlying machine (at least on Intel Architecture) represents Floating Point values as approximations using a hardware format represented in bits.

While this may be sufficient for scientific calculations, consider financial applications. Two problems such as tolerance in a brokerages assignment of positions to funds, and Quantitative calculations that aim to decide pricing of securities and derivatives. Under these circumstances, an institution may not want an approximation of a Floating Point value since such a value would represent money.

To remedy this situation, we designed Multi Arbitrary Precision library to implement arbitrary precise Floating Point using an integer value and a mantissa value. This way, there is no loss of precision and one can compare Floating Point numbers directly. In fact, our library provides drop-in replacements of built-in integer and float types to ease the migration. Consider using Multi for your next FinTech project.

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *