comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: fixed point vs floating point
Date: 1997/11/25
Date: 1997-11-25T00:00:00+00:00	[thread overview]
Message-ID: <dewar.880487594@merv> (raw)
In-Reply-To: gwinn-2511971025020001@dh5055083.res.ray.com


Joe says

<<The fixed point arithmetic in the Ada83 compilers that we used and tested
  in those days didn't work well or even correctly in many cases, so we
  never used it.  I don't offhand recall doing an Ada job that didn't use
  floating point; Ada83 was mostly used on the larger computers, such as
  VAXes and Silicon Graphics boxes, so the issue never came up.   The
  exception may have been XD Ada from System Designers (where are they now?)
  on the 68020.>>

While I can't speak for all Ada 83 compilers, I certainly know many of them
that did fixed-point just fine. It has actually been my experience that in
most cases where users thought Ada 83 compilers were doing things wrong, it
was because they did not understand the Ada 83 fixed-point semantics properly,
so it would be interesting to know specifically what Joe is referring to.

<<So, why do we prefer floating point, speed aside?  Because it's easier to
  program with, as scaling issues go away, and so it's much easier to get
  right.  Remember, the traditional comparison was with manually-implemented
  scaled binary.  The fact that floating point arithmetic is approximate
  isn't much of an issue for most physics-based mathematical code, and those
  places that are exceptions are still *much* less trouble to deal with than
  the traditional scaled binary.>>

So how do we square this with Robert Eachus claim that it is *easier* to
analyze fixed-point code. Simple actually, it depends on what you are doing.
If you are writing code casually, without careful error analysis, then it is
indeed true that floating-point is easier, but if you are doing careful
error analysis, then fixed-point is usually easier. Joe's offhand comment
about errors not being an issue for most physics-based mathematical code
(I do not agree!) clearly indicates that we are dealing with the casual
approach here, so in that context Joe's comment makes good sense.

<<With Ada95 (which I assume has fixed the Ada83 problems with fixed-point
  arithmetic)>>

I really don't know what problems might be fixed, since I don't know of
problems in Ada 83, at least not ones that are likely to be what Joe is
referring to, so I can't say whether these problems have been fixed!
Certainly to the extent that Joe was seeing compiler bugs in compilers
I am unfamiliar with, this seems to have no relationship to Ada 95.






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

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-22  0:00 fixed point vs floating point Matthew Heaney
1997-11-22  0:00 ` Tucker Taft
1997-11-22  0:00   ` Robert Dewar
1997-11-22  0:00     ` Matthew Heaney
1997-11-23  0:00 ` Geert Bosch
1997-11-23  0:00   ` Matthew Heaney
1997-11-23  0:00     ` Robert Dewar
1997-11-24  0:00       ` Herman Rubin
1997-11-24  0:00         ` Robert Dewar
1997-11-25  0:00           ` Joe Gwinn
1997-11-25  0:00             ` Matthew Heaney
1997-11-25  0:00             ` Robert Dewar [this message]
1997-11-25  0:00               ` Joe Gwinn
1997-11-25  0:00                 ` Robert Dewar
1997-11-26  0:00                   ` Joe Gwinn
1997-11-26  0:00                     ` Robert Dewar
1997-12-01  0:00                       ` Joe Gwinn
1997-12-01  0:00                         ` Robert Dewar
1997-12-01  0:00                           ` Joe Gwinn
1997-12-03  0:00                           ` robin
1997-11-26  0:00             ` William A Whitaker
1997-11-24  0:00     ` Geert Bosch
1997-11-23  0:00   ` Tom Moran
1997-11-25  0:00     ` John A. Limpert
1997-11-25  0:00       ` Robert Dewar
1997-11-25  0:00       ` Robert Dewar
1997-11-24  0:00 ` Vince Del Vecchio
1997-11-24  0:00 ` Vince Del Vecchio
1997-12-03  0:00 ` robin
     [not found] <9711221603.AA03295@nile.gnat.com>
1997-11-22  0:00 ` Ken Garlington
  -- strict thread matches above, loose matches on Subject: below --
1997-11-27  0:00 tmoran
1997-11-27  0:00 ` Robert Dewar
1997-11-29  0:00   ` Tarjei T. Jensen
1997-11-28  0:00 tmoran
1997-11-28  0:00 ` Robert Dewar
1997-12-02  0:00 Robert Dewar
1997-12-02  0:00 ` Joe Gwinn
1997-12-02  0:00   ` Robert Dewar
1997-12-02  0:00     ` Matthew Heaney
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00     ` robin
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00     ` Shmuel (Seymour J.) Metz
1997-12-03  0:00       ` Matthew Heaney
1997-12-04  0:00         ` Shmuel (Seymour J.) Metz
1997-12-04  0:00           ` Robert Dewar
1997-12-03  0:00       ` Robert Dewar
1997-12-03  0:00       ` Robert Dewar
1997-12-02  0:00   ` Ken Garlington
1997-12-03  0:00     ` Joe Gwinn
1997-12-04  0:00       ` Robert Dewar
1997-12-04  0:00         ` Shmuel (Seymour J.) Metz
1997-12-03  0:00 ` robin
2011-09-29 10:25 RasikaSrinivasan@gmail.com
2011-09-29 10:49 ` AdaMagica
2011-09-29 13:38   ` Martin
2011-09-30 10:17 ` Stephen Leake
2011-09-30 16:25   ` tmoran
2011-09-30 16:52     ` Dmitry A. Kazakov
2011-10-01 11:09     ` Stephen Leake
2011-09-30 19:26   ` tmoran
2011-09-30 22:31   ` tmoran
2011-10-01 13:37   ` RasikaSrinivasan@gmail.com
2011-10-02 14:19     ` Stephen Leake
replies disabled

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