comp.lang.ada
 help / color / mirror / Atom feed
From: westley@corsair.uucp (Terry J. Westley)
Subject: Re: language support for fixed-point arithmetic
Date: 19 Mar 90 17:55:59 GMT	[thread overview]
Message-ID: <1990Mar19.175559.17109@planck.uucp> (raw)
In-Reply-To: 787@eedsp.eedsp.gatech.edu

In article <787@eedsp.eedsp.gatech.edu> baud@eedsp.eedsp.gatech.edu (Kurt Baudendistel) writes:
>  Ada supports an intrinsic fixed-point type that allows the user 
>      to specify the range (maximum absolute value supported) and 
>      scale (maximum required step-size). It is intended to be
>      implemented via an integer arithmetic unit to provide (1) fixed-
>      accuracy computations and (2) efficient execution in embedded
>      systems without floating-point hardware support.
>
>Please respond, and please respond by e-mail! If you are interested
>in the results of my search, e-mail a result-request as well.
>

First, thanks to Mr. Baudendistel for posting technical questions and
comments, not language war stuff.

I find Watt, Wichmann, and Findlay's _ADA_Language_and_Methodology_
(Prentice-Hall) useful in teaching advanced Ada students about fixed
point types.  It includes a section on analyzing how the error bound
grows when performing many fixed point type calculations.  However, it
is not a formal or exhaustive treatement of the subject.

Please e-mail me or post the results. 

Fixed point types are potentially very useful, but I have run into a
number of interesting educational challenges, all originating from
users' expectations.  (This is in a real-time system running on a
distributed network of M68030 and Sun workstation environment.)

1. Designers and programmers understand why 'small must be a power of
   two, but they wish they could have it be any arbitrary size.  In
   principle, this seems very possible, but I can see the performance
   problems that would crop up because people use a powerful feature
   without realizing what is really happening in the machine.

2. Users see the potential of fixed point types to give them the best of
   both worlds of real and integer types, and they want more of each.
   For example, they see a number as a real and expect to use the math
   co-processor.  Naturally, converting back and forth to a floating point
   type destroys much the integer representation advantages.

I am slowly beginning to get across the responsibility of the designer
in choosing data types and the flexibility there is to add operations as
needed.

You give them an inch and they'll take a mile.  Then, they complain that
the compiler doesn't support the mile.  Then, they realize they can
bridge the mile themselves with not too much effort.  Great stuff!!

Terry J. Westley
Arvin/Calspan Advanced Technology Center
P.O. Box 400, Buffalo, NY 14225
acsu.buffalo.edu!planck!hercules!westley

  parent reply	other threads:[~1990-03-19 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-03-15 17:42 language support for fixed-point arithmetic Kurt Baudendistel
1990-03-15 23:03 ` Bob Robison
1990-03-19 17:55 ` Terry J. Westley [this message]
1990-03-21 22:17   ` Robert I. Eachus
1990-03-23 14:43     ` 'small not power of 2 (Was: language support for fixed-point arithmetic) Terry J. Westley
1990-03-26 18:36 ` language support for fixed-point arithmetic C. D. Covington
replies disabled

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