[Haskell-cafe] What is a safe Haskell data type to store and manipulate Money values?

Joachim Durchholz jo at durchholz.org
Wed Apr 5 05:08:23 UTC 2017

Am 05.04.2017 um 05:20 schrieb Richard A. O'Keefe:
>> On 5/04/2017, at 3:53 AM, Joachim Durchholz <jo at durchholz.org> wrote:
>> Yeah, floating point is a no-go for monetary values.
>> They can be the right tool when combining percentages, or actualy any factor that is supposed to be multiplied with a monetary value.
> *Binary* floats, yes.  But IEEE *decimal* floats

Ah, right, I forgot about these.

 > were specifically designed to support
> commercial calculations, and the current COBOL standard offers decimal floats as one
> of three interpretations of COBOL fixed-point arithmetic.

What languages besides Cobol actually make use of them?

> It helps to have hardware that supports decimal floats, of course.  Probably no
> surprise that current z/Series and Power machines do, most others don't (yet).

Are there any plans by Intel or AMD to support them?
I'm not aware of any, but you never know.

More information about the Haskell-Cafe mailing list