From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: fixed point vs floating point
Date: 1997/11/22
Date: 1997-11-22T00:00:00+00:00 [thread overview]
Message-ID: <EK29JB.Jor.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: mheaney-ya023680002211970739180001@news.ni.net
Matthew Heaney (mheaney@ni.net) wrote:
: Matthew asks:
: <<Can you elaborate on that? I've often observed that floating point is
: used when fixed point is clearly called for, ie a bearing or latitude.
: What are the specific reasons to avoid fixed point?>>
: Robert replies:
: <<Most obviously, on most architectures, fixed-point is drastically slower
: than flowting-point.>>
I'm not sure to what Robert is referring here. Fixed + fixed is
as efficient as the normal integer operation, as is Fixed - Fixed,
Fixed * Integer, and Fixed / Integer. The only operations that are
potentially inefficient are Fixed * Fixed and Fixed / Fixed, neither of which
are particularly likely when the fixed-point type represents an angle ;-).
Even if you do use Fixed * Fixed or Fixed / Fixed, the inefficiency
has to do with sometimes having to shift the result or one of the
operands after/before performing the operation (presuming binary
smalls). If the machine has efficient shifting, this is not a major
overhead. However, it may be that on some compilers, the fixed-fixed
multiplication/division operations are handled out-of-line, and the
procedure-call overhead is the primary added expense.
: ...
: Matthew Heaney
: Software Development Consultant
: <mailto:matthew_heaney@acm.org>
: (818) 985-1271
--
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Burlington, MA USA
next prev parent reply other threads:[~1997-11-22 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 [this message]
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 ` 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-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 ` Robert Dewar
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-25 0:00 ` Matthew Heaney
1997-11-26 0:00 ` William A Whitaker
1997-11-24 0:00 ` Geert Bosch
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 ` Robert Dewar
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-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