Didn't IBM mainframes use their own floating-point format?  I seem to recall
that their exponent was a couple of bits shorter so the mantissa could be a
couple of bits longer, so their decimal exponents went from _80 to 79 or
something like that.

On Tue, Mar 17, 2009 at 6:06 PM, Raul Miller <[email protected]> wrote:

> On Tue, Mar 17, 2009 at 5:23 PM, James C Field <[email protected]>
> wrote:
> >> Isn't this why IBM supported Binary Coded Decimal? Floating Point sux
> for money.
>
> Floating point works fine for money unless you represent values as
> fractions.
>
> In other words, scale things properly and you should be fine.
>
> Bad: 1.99 dollars
> Good: 199 cents
>
> That said, if you are representing money values in cents, you can run
> into problems if you deal with values exceeding 45 trillion dollars.
> With inflation, this might become a real problem before too long.
>
> On the other hand, if inflation gets that bad, losing a few pennies here
> and there should be a relatively minor worry.  It's not as if they would
> be worth much of anything under those circumstances.
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to