comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: fixed point vs floating point (When do you use it ?)
Date: 1997/11/27
Date: 1997-11-27T00:00:00+00:00	[thread overview]
Message-ID: <dewar.880662487@merv> (raw)
In-Reply-To: 65kgtt$289@lotho.delphi.com


tmoran says

<<A stocks & commodities database I know of uses fixed point.  Stocks have a
delta of 1/8 (though that is supposed to change to decimal soon) and
different commodities have a bunch of different deltas.
>>

The fact that stocks have a delta of 1/8 is NOT a good reason to choose
fixed-point over floating-point for the representation of these values.
In practice all stock values will be model numbers of any reasonable
floating-point type, so the issue of accurate representation does not 
arise. What is important is the computations that you propose to perform
on these values. I would guess that for most purposes, it is better to
use floating-point for stock prices than fixed-point (of course if you
are in COBOL, you have little choice, and indeed stock prices don't fit
nicely into COBOL, which has no provision for binary fixed-point).





  reply	other threads:[~1997-11-27  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-27  0:00 fixed point vs floating point (When do you use it ?) tmoran
1997-11-27  0:00 ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-11-28  0:00 tmoran
1997-11-28  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox