Related articles |
---|
Distributivity and types sanjayp@ddi.com (Sanjay Pujare) (1999-05-22) |
Re: Distributivity and types wclodius@aol.com (1999-05-22) |
Re: Distributivity and types adrian@dcs.rhbnc.ac.uk (1999-05-27) |
Re: Distributivity and types anton@mips.complang.tuwien.ac.at (1999-05-27) |
Re: Distributivity and types adrian@dcs.rhbnc.ac.uk (1999-05-29) |
Re: Distributivity and types jonathan_barker@my-deja.com (1999-05-29) |
From: | adrian@dcs.rhbnc.ac.uk (A Johnstone) |
Newsgroups: | comp.compilers |
Date: | 29 May 1999 01:07:49 -0400 |
Organization: | Royal Holloway, University of London |
References: | 99-05-111 99-05-122 99-05-140 |
Keywords: | optimize |
On architectures where these issues are carefully considered, in
particular on digital signal processing devices, saturated arithmetic
is implemented in which an overflow is mapped to the largest
(smallest) number within the range, and any operation applied to the
largest (smallest) number within the range returns the largest
(smallest) number in the range. Some C compilers for these
architectures (eg the TMS320C6x ANSI C compiler) provide compiler
intrinsics that use saturated arithmetic. It has always seemed to me
to be a pragmatic and humane alternative to wrap-round or to trapping
overflows.
Adrian
--
Dr Adrian Johnstone, Senior Lecturer in Computing, Computer Science Dep,
Royal Holloway, University of London, Egham, Surrey, TW20 0EX, England.
Email a.johnstone@rhbnc.ac.uk Tel:+44(0)1784 443425 Fax:+44(0)1784 439786
Return to the
comp.compilers page.
Search the
comp.compilers archives again.