What is a safe Haskell data type to store and manipulate Money values?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

What is a safe Haskell data type to store and manipulate Money values?

Sandeep Cr
Hello all,

What is a good data type for storing and manipulating monetary values in a typical web application with payment processing? What are the pros and cons of various options like Data.Scientific, Rational and Decimal? 

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Manuel Gómez
On Mon, Apr 3, 2017 at 9:50 PM Sandeep Cr <[hidden email]> wrote:
> What is a good data type for storing and manipulating monetary values in a typical web application with payment processing? What are the pros and cons of various options like Data.Scientific, Rational and Decimal?

It depends on what sort of computation you'll be doing upon those
monetary values and on the expectations of your users.  It's typical
that payment processing applications sacrifice precision and instead
prefer to deal in exact quantities, in which case you probably want
some fixed-precision type with cents, and you'll want to be quite
careful about your arithmetic.  I insist that this is not necessarily
what you want depending on the expectations of your users and I would
recommend reviewing the usual go-to piece of literature on the hazards
of numerical computing:
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

I would say you ought to pick your semantics first, and then find the types
that match, which is indeed secondary.  Avoid any universal
nuance-free advice like "never use floating point" or "use integers
for cents" as conventional wisdom on this topic is often wrong for
many applications.  Check whether regulatory compliance affects your
choice of semantics.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Saurabh Nanda
Hi Manuel,

Thank you for your reply. Some clarifications below...
 
It depends on what sort of computation you'll be doing upon those
monetary values and on the expectations of your users.  It's typical
that payment processing applications sacrifice precision and instead
prefer to deal in exact quantities

Is there a document which explains common use-cases for monetary values and best-practices for dealing with them? Any guidelines for which **Haskell** data-types to use for what kind of monetary calculations? 

Here is what we are doing in our app:

* Powering web-based e-commerce checkout flows
* Allowing store owners to input tax rates
* Allowing end-customers to see product prices in different currencies (so, currency conversion)
* Various reports to see total sales, total receivables, and total payables (basically a **very** small subset of small-business accounting)
* Exporting data to full-fledged accounting systems, like Quickbooks and Xero.

Based on this use-case, which Haskell data-type would you suggest?

-- Saurabh.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Peter Simons-2
Hi Saurabh,

a good place to start might be the "Amount" type provided by the
hleder-lib package:

  http://hackage.haskell.org/package/hledger-lib-1.2/docs/Hledger-Data-Types.html#t:Amount

It is based on 'Decimal':

  http://hackage.haskell.org/package/Decimal

Best regards,
Peter

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

David Turner-2
In reply to this post by Saurabh Nanda

On 4 Apr 2017 13:57, "David Turner" <[hidden email]> wrote:
It's the currency conversions that will provide the most interesting challenges in that list. If you were only working in a single currency then something based on `Integer` would, I think, be fine. Perhaps `Int` or `Int64` if you needed the extra speed.

There are a number of different ways to implement multiple currencies depending on your desired semantics and applicable accounting rules and regulations. Peter Selinger has a good tutorial covering this at http://www.mathstat.dal.ca/~selinger/accounting/tutorial.html

One thing to watch out for: do you want to be able to do arithmetic on amounts from different currencies? As in, do you want £5 + $5 to have a meaningful result? If you can avoid this, life will be much simpler.



On 4 Apr 2017 12:22, "Saurabh Nanda" <[hidden email]> wrote:
Hi Manuel,

Thank you for your reply. Some clarifications below...
 
It depends on what sort of computation you'll be doing upon those
monetary values and on the expectations of your users.  It's typical
that payment processing applications sacrifice precision and instead
prefer to deal in exact quantities

Is there a document which explains common use-cases for monetary values and best-practices for dealing with them? Any guidelines for which **Haskell** data-types to use for what kind of monetary calculations? 

Here is what we are doing in our app:

* Powering web-based e-commerce checkout flows
* Allowing store owners to input tax rates
* Allowing end-customers to see product prices in different currencies (so, currency conversion)
* Various reports to see total sales, total receivables, and total payables (basically a **very** small subset of small-business accounting)
* Exporting data to full-fledged accounting systems, like Quickbooks and Xero.

Based on this use-case, which Haskell data-type would you suggest?

-- Saurabh.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Sven Panne-2
In reply to this post by Manuel Gómez
2017-04-04 7:05 GMT+02:00 Manuel Gómez <[hidden email]>:
[...]  Check whether regulatory compliance affects your choice of semantics.

This is the most important advice: You'll probably run into legal trouble if you choose e.g. the wrong rounding mode, and for a good reason: If you handle millions of transactions in your system and sneakily always round cents "into your own pocket", you'll be a rich man. That's the reason behind the tons of rounding modes in e.g. http://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html. Ask your local lawyer which is the right one. ;-) I have serious doubts that you can handle such things with a floating point representation.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Saurabh Nanda

This is the most important advice: You'll probably run into legal trouble if you choose e.g. the wrong rounding mode, and for a good reason: If you handle millions of transactions in your system and sneakily always round cents "into your own pocket", you'll be a rich man. That's the reason behind the tons of rounding modes in e.g. http://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html. Ask your local lawyer which is the right one. ;-) I have serious doubts that you can handle such things with a floating point representation.

That's an important point you raise. 

Leaving aside the legal aspects of this, what would be Haskell's equivalent of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?

-- Saurabh.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

ALeX Kazik
> Leaving aside the legal aspects of this, what would be Haskell's equivalent
> of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?

Rational?

ALeX.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

David Turner-2
`Data.Decimal.Decimal` is quite close to Java's `BigDecimal` in intent but not quite the same: Java's `BigDecimal` has a 32-bit signed exponent whereas Haskell's `Decimal`'s exponent is 8-bit and unsigned. The difference shouldn't matter for the purposes of tracking money since accountancy rules are generally designed to prefer (carefully specified) rounding over keeping track of numbers with hundreds of decimal places.

On 4 April 2017 at 15:13, ALeX Kazik <[hidden email]> wrote:
> Leaving aside the legal aspects of this, what would be Haskell's equivalent
> of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?

Rational?

ALeX.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Joachim Durchholz
In reply to this post by ALeX Kazik
Am 04.04.2017 um 16:13 schrieb ALeX Kazik:
>> Leaving aside the legal aspects of this, what would be Haskell's equivalent
>> of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?
>
> Rational?

You'd be constantly be doing explicit calculations to get back to a
denominator of 100. Plus you'd have to deal with those cases where the
denominator is a divisor of 100, and you'd need explicit nonstandard
conversion to strings.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

David Turner-2
On 4 April 2017 at 15:50, Joachim Durchholz <[hidden email]> wrote:
Am 04.04.2017 um 16:13 schrieb ALeX Kazik:
Leaving aside the legal aspects of this, what would be Haskell's equivalent
of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?

Rational?

You'd be constantly be doing explicit calculations to get back to a denominator of 100. Plus you'd have to deal with those cases where the denominator is a divisor of 100, and you'd need explicit nonstandard conversion to strings.


The same sort of fiddling-the-denominator problems also occur if you use `Decimal` - it's not normally useful to be able to represent things smaller than £0.01 (or whatever the smallest unit of your local currency is); I'd even go as far as to say it's useful to be able to be sure that you _can't_ represent such things (in the domain of basic accounting at least - more complex things may deal with smaller fractions of currency, so YMMV etc).

Cheers,



 

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Saurabh Nanda
In reply to this post by Joachim Durchholz
Curious to know what StanChart is using to represent monetary values in its Haskell code.

-- Saurabh.


On Tue, Apr 4, 2017 at 8:20 PM, Joachim Durchholz <[hidden email]> wrote:
Am 04.04.2017 um 16:13 schrieb ALeX Kazik:
Leaving aside the legal aspects of this, what would be Haskell's equivalent
of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?

Rational?

You'd be constantly be doing explicit calculations to get back to a denominator of 100. Plus you'd have to deal with those cases where the denominator is a divisor of 100, and you'd need explicit nonstandard conversion to strings.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.



--

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Brandon Allbery
In reply to this post by David Turner-2

On Tue, Apr 4, 2017 at 11:10 AM, David Turner <[hidden email]> wrote:
it's not normally useful to be able to represent things smaller than £0.01 (or whatever the smallest unit of your local currency is)

Currency conversion was specifically mentioned, and from what I have seen the convention there is to go to tenths of the local smallest unit of currency. Going to the smallest unit itself in the presence of currency conversions is problematic.


--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Joachim Durchholz
In reply to this post by David Turner-2
Am 04.04.2017 um 17:10 schrieb David Turner:

> On 4 April 2017 at 15:50, Joachim Durchholz <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Am 04.04.2017 um 16:13 schrieb ALeX Kazik:
>
>         Rational?
>
>     You'd be constantly be doing explicit calculations to get back to a
>     denominator of 100. Plus you'd have to deal with those cases where
>     the denominator is a divisor of 100, and you'd need explicit
>     nonstandard conversion to strings.
>
>
>
> The same sort of fiddling-the-denominator problems also occur if you use
> `Decimal` - it's not normally useful to be able to represent things
> smaller than £0.01 (or whatever the smallest unit of your local currency
> is); I'd even go as far as to say it's useful to be able to be sure that
> you _can't_ represent such things (in the domain of basic accounting at
> least - more complex things may deal with smaller fractions of currency,
> so YMMV etc).

Decimal has a roundTo function, Rational does not.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Joachim Durchholz
In reply to this post by Sven Panne-2
Am 04.04.2017 um 15:46 schrieb Sven Panne:
> 2017-04-04 7:05 GMT+02:00 Manuel Gómez <[hidden email]
> <mailto:[hidden email]>>:
>
>     [...]  Check whether regulatory compliance affects your choice of
>     semantics.
>
>
> This is the most important advice: You'll probably run into legal
> trouble if you choose e.g. the wrong rounding mode,

I have yet to hear about *any* case where that led to legal issues.
Most cases would be laughed out of court anyway - nobody litigates for
0.5 cents. The PR backlash could be much worse.

 > and for a good
> reason: If you handle millions of transactions in your system and
> sneakily always round cents "into your own pocket", you'll be a rich
> man.

Actually they're insignificant unless you're doing very specialized
stuff (microtransactions, long-running debt repayment plans).
E.g. for currency conversion, you set a spread which is typically way
above any round-off profit you could make.

I.e. from a business perspective, it's pointless to try that under most
circumstances.

 > That's the reason behind the tons of rounding modes in e.g.
> http://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html.

I think these rounding modes have two origins, one of them in the IEEE
standard for floating-point numbers, the other is financial calculations.
Note that it doesn't matter much which of the modes you use as long as
it's reasonable (that's why some countries have "banker's rounding").

You *might* still run into regulations, of course, but I'm pretty sure
that if you stick with a specific rounding mode it's essentially okay.
Otherwise it would be pretty difficult to run a business with branches
in Europe and America, after all.

 > I have serious doubts that
> you can handle such things with a floating point representation.

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.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Frederic Cogny
In reply to this post by Saurabh Nanda
From memory: 
At StanChart the Haskell library is mostly used in Financial Market for derivatives pricing, the accounting and actual payment processing is done by other back-office softwares.
So Double was used to represent "simulated" values (the price of a derivative being the NPV of expected cash flows) and for computing actual payments rounding rules are used with the relevant decimal (based on ISO 4217 tables).


On Tue, Apr 4, 2017 at 5:16 PM Saurabh Nanda <[hidden email]> wrote:
Curious to know what StanChart is using to represent monetary values in its Haskell code.

-- Saurabh.


On Tue, Apr 4, 2017 at 8:20 PM, Joachim Durchholz <[hidden email]> wrote:
Am 04.04.2017 um 16:13 schrieb ALeX Kazik:
Leaving aside the legal aspects of this, what would be Haskell's equivalent
of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?

Rational?

You'd be constantly be doing explicit calculations to get back to a denominator of 100. Plus you'd have to deal with those cases where the denominator is a divisor of 100, and you'd need explicit nonstandard conversion to strings.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
--
Frederic Cogny
+33 7 83 12 61 69

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Jeremy Shaw-3
In reply to this post by Sandeep Cr
I once implemented a decimal library based around this PEP,


Not sure if that is a good idea or not -- but it seemed like a good idea at the time.

- jeremy

On Mon, Apr 3, 2017 at 7:48 PM, Sandeep Cr <[hidden email]> wrote:
Hello all,

What is a good data type for storing and manipulating monetary values in a typical web application with payment processing? What are the pros and cons of various options like Data.Scientific, Rational and Decimal? 

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Richard A. O'Keefe
In reply to this post by Saurabh Nanda

> On 4/04/2017, at 11:21 PM, Saurabh Nanda <[hidden email]> wrote:
> Is there a document which explains common use-cases for monetary values and best-practices for dealing with them? Any guidelines for which **Haskell** data-types to use for what kind of monetary calculations?

I think you may need to talk to an accountant to find out what rounding
rules are required for your application.  As long as you are just adding
and subtracting amounts of money, integer numbers of cents work fine.
As soon as you start multiplying by percentages (to compute discounts,
penalties, or taxes -- hello VAT, GST, &c -- it gets trickier.
>
> Here is what we are doing in our app:
>
> * Powering web-based e-commerce checkout flows
> * Allowing store owners to input tax rates

Ah.  There you go.  A 15% GST on $1.37 is 20.55 cents.
We used to have a 12.5% GST, and 12.5% of $1.36 is 17.125 cents.

> * Allowing end-customers to see product prices in different currencies (so, currency conversion)
> * Various reports to see total sales, total receivables, and total payables (basically a **very** small subset of small-business accounting)

There are Haskell data types that will let you compute sums and
differences of money times percentages exactly.  For final reporting,
you will need to round.  The rounding rule is *probably* the one
you learned in school, but you really should check with a friendly
accountant.

> * Exporting data to full-fledged accounting systems, like Quickbooks and Xero.
>
> Based on this use-case, which Haskell data-type would you suggest?

Data.Decimal doesn't do a lot, but it probably does almost everything you
need.  What it *doesn't* offer is operations with controlled rounding or
much in the way of rounding methods (if I recall correctly IEEE decimal
floats offer seven different rounding modes and the extra three, compared
with binary floats, were added to support commercial calculations).
It's not going to be terribly hard to program whatever rounding you need.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Richard A. O'Keefe
In reply to this post by Joachim Durchholz

> On 5/04/2017, at 3:53 AM, Joachim Durchholz <[hidden email]> 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 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.

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).

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: What is a safe Haskell data type to store and manipulate Money values?

Joachim Durchholz
Am 05.04.2017 um 05:20 schrieb Richard A. O'Keefe:
>
>> On 5/04/2017, at 3:53 AM, Joachim Durchholz <[hidden email]> 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.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
12