comp.lang.ada
 help / color / mirror / Atom feed
From: vince.delvecchio@see-below.analog.com (Vince Del Vecchio)
Subject: Re: fixed point vs floating point
Date: 1997/11/24
Date: 1997-11-24T00:00:00+00:00	[thread overview]
Message-ID: <65cc5r$k5@nwd2nws1.analog.com> (raw)
In-Reply-To: mheaney-ya023680002211970739180001@news.ni.net


	<mheaney-ya023680002211972146020001@news.ni.net>
Date: 24 Nov 1997 12:10:12 -0500
Message-ID: <nb4wwhymd57.fsf@dejavu.spd.analog.com>
Organization: Analog Devices CPD
Lines: 39
X-Newsreader: Gnus v5.3/Emacs 19.33

mheaney@ni.net (Matthew Heaney) writes:

> Let's change the problem a bit.  What's more expensive: to calculate the
> sine of a fixed point with a binary small, or to calculate the sine of a
> floating point?  What about making the fixed point 32 bits instead of 64 -
> will that make it more efficient?
> 
> That processor Intermetrics is building an Ada compiler for (SHARC, or
> something like that) comes with "fixed point math in hardware."  Will that
> make any difference in efficiency?

The SHARC (and other Analog Devices DSPs) only support fixed-point math
with a fixed binary point.  Specifically, they support
  type Signed_Fixed is delta 2**(-Word_Size + 1) range -1.0 .. 1.0;
and
  type Unsigned_Fixed is delta 2**(-Word_Size) range 0.0 .. 1.0;

where small == delta, upper endpoint is not a member of the type,
and, for Sharc, Word_Size == 32.

The difference from many other processors is that they have operations for
  Signed_Fixed * Signed_Fixed => Signed_Fixed
  Unsigned_Fixed * Unsigned_Fixed => Unsigned_Fixed
where the shifting you need to do is built to the instruction.

For arbitrary smalls, it probably won't be any faster than on other
processors, but if you restricted yourself to certain smalls, it would
be possible to be as efficient as floating-point.  

On the other hand, for the Sharc specifically, there is no fixed point
sin routine in the C runtime library (or the Ada runtime library, for
that matter).  That is mostly because the processor also has floating
point, and I think most people use the floating point.  Fixed point
transcendental operations are much more prevalent on our fixed-point-only
processors.

-Vince Del Vecchio
vince.delvecchio@analog.com
Not speaking for Analog Devices




  parent reply	other threads:[~1997-11-24  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   ` 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 [this message]
1997-11-24  0:00 ` Vince Del Vecchio
1997-12-03  0:00 ` robin
  -- strict thread matches above, loose matches on Subject: below --
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
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       ` 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-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
1997-11-28  0:00 tmoran
1997-11-28  0:00 ` Robert Dewar
1997-11-27  0:00 tmoran
1997-11-27  0:00 ` Robert Dewar
1997-11-29  0:00   ` Tarjei T. Jensen
     [not found] <9711221603.AA03295@nile.gnat.com>
1997-11-22  0:00 ` Ken Garlington
replies disabled

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