comp.lang.ada
 help / color / mirror / Atom feed
* Re: Fixed point data in Ada
@ 1982-11-02  6:28 duke!bcw
  1982-11-02 12:30 ` utcsrgv!donald
  1982-11-04  2:01 ` eagle!jerry
  0 siblings, 2 replies; 3+ messages in thread
From: duke!bcw @ 1982-11-02  6:28 UTC (permalink / raw)


From:	Bruce C. Wright @ Duke University
Re:	Fixed point data types in Ada

The term "poor man's floating point" to describe the Ada fixed-point data
type is not meant to be an exact description of the Ada data type (obviously
a fixed radix point does not "float"), but was meant as a way of trying to
describe the data type to people who had likely not encountered such a type
in PL/I or Cobol.

The term is not mine;  consider this phrase from the "Rationale for the
Design of the ADA Programming Language" by Ichbiah, Heliard, Roubine, Barnes,
Krieg-Brueckner, and Wichmann:  Section 5.1.2, paragraph 5 refers to the
need for a "cheap floating point";  my precise term was borrowed from Peter
Wegener in his book "Programming with Ada: an Introduction by means of
Graduated Examples," Section 3.3, page 96.

Secondly, although it is true that a number of real-world objects are defined
in terms of fixed-point numbers (like time, money, etc), the Ada fixed-point
facility is **not** sufficient for manipulating such things with 100%
accuracy, but is subject to error.  A private communication from Jerry
Schwartz (harpo!eagle!jerry) indicates that the final report did clear up
the ambiguity:  the delta value must be a power of two and must be represented
exactly.  Note that this specifically excludes money or time data from use
with the Ada fixed point data type, unless you don't mind rounding error.
Also, fixed point is now apparently "optional" for the implementation (what
became of the requirement for no subsets? Sounds like a subset to me!).

			Bruce C. Wright @ Duke University



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1982-11-04  2:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1982-11-02  6:28 Fixed point data in Ada duke!bcw
1982-11-02 12:30 ` utcsrgv!donald
1982-11-04  2:01 ` eagle!jerry

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