Related articles |
---|
SARITH: Safe ARITHmetic - A Progress Report geoff@elj.com (2000-02-05) |
Re: SARITH: Safe ARITHmetic - A Progress Report bobduff@world.std.com (Robert A Duff) (2000-02-19) |
From: | Robert A Duff <bobduff@world.std.com> |
Newsgroups: | comp.compilers |
Date: | 19 Feb 2000 00:29:54 -0500 |
Organization: | The World Public Access UNIX, Brookline, MA |
References: | 00-02-022 |
Keywords: | arithmetic |
geoff@elj.com writes:
> "wrap-around" result. It is certainly not new: Ada is an example of a
> high-level language that implements saturation; ...
Ada has no predefined/built-in support for saturation. Ada has two
kinds of integer types: one kind detects overflow (raises an
exception). The other kind (called "modular types") wraps around.
Perhaps you meant that one could define such a thing in Ada, using
user-defined operator symbols and so forth?
> Everything so far is 100% tested (for all possible input value
> combinations).
How long does it take to test, say, add of two 32-bit unsigned integers?
There are about 10**19 input value combinations.
;-) ;-)
- Bob
Return to the
comp.compilers page.
Search the
comp.compilers archives again.