[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: First calculation problem



PureBytes Links

Trading Reference Links

Re resource usage of single vs doubel precission. 

Let's look at the numbers: O,H,L,C,V,OI with floats and longs uses 24
bytes, with O,H,L,C as doubles uses 40 bytes. Let's add 10 indicators
(floats or doubles respectively) for a bar total of 64 bytes and 120
bytes. For a 1000-bar charts this amounts to 64k and 120k. 

Even with 10 open charts the total savings is ~ 600k of memory, which
is insignificant.

Furthermore:
1. precision is much lower with float than double
2. single precision math is SLOWER than double precision on modern
procesors, since the internal processor representation is doubles with
extended precision. This requires conversion back and forth all the
time.

I really like MetaStock much more than any of the competing products,
but have found myself forced to write custom software to deal with lack
of accuracy, poor realtime performance and the like. I now juse use MS
Pro for graphing and collection of RT data.

Allan

--- PD Manager <pdmanager@xxxxxxxxxxxxxxxxx> wrote:
> Guy:

> The differences you are seeing are based on the differences between
> single
> and double precision.  As I have stated, we have considered going to
> double
> precision but it comes at a cost in computer resources and therefore
> we do
> not take the decision lightly.  Also, double precision does not
> guarantee
> absolute accuracy.  If we went to double precision, we would only be
> duplicating the errors that appear in other double precision based
> applications.  I would agree that the precision of MetaStock would
> indeed
> improve but if you are interested in ABSOLUTE accuracy of your
> computations,



=====
---
Allan Havemose, Ph.D.
havemose@xxxxxxxxxx
havemose@xxxxxxxxx

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/