Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Mirsad Todorovac
Subject: Real with attributes (...)
Date: 1 Jul 2003, 15:36:03
Please read without prejudice!
What would you think of the following: we all know about various bitsizes
Integer and Cardinal types.
What I've seen was a "customized" real type. Imagine you have to store
lots of data for GSM-encoding, or some similar measurement purpose. Lots
of bits are wasted, as they don't correspond to accurate digits of
measurement. I.e. on a weather station that has only an occassional link
to a satellite.
For example, let's suppose we have lots of data that that we could express
as reals in 16-bit precision, and all fit between -0.5 and 0.5 (for
example, but standard can be defined in different way):
type MyReal = Real attribute (Exponent = 0, Mantissa = 16);
GSMReal = Real attribute (Exponent = 8, Mantissa = 8);
The latter could represent a number with same range like IEEE single
precision float, just with only 2 accurate digits.
or even
TEMPReal = Real attribute (ExponentRange = 0..15, Mantisa = 4);
for keeping the temperature in one byte from range of 0.0625 K to 30720 K
(where precision is not that much important as the value on the
logarithmic scale ...)
The compiler could use hardware floating point when it's faster than
emulation with less bits of precision, then round/truncate when storing
back into memory/variable.
This is just a tip, not a real syntax or semantics proposal.
Mirsad
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Frank Heckenbach | Real with attributes (...) | 1 Jul 2003, 18:26:48 |
| Jean-Pierre Vial | Real with attributes (...) | 1 Jul 2003, 17:09:05 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).