Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.programmer > #6533

Re: Arithmetic overflow checking

From Lew Pitcher <lpitcher@teksavvy.com>
Subject Re: Arithmetic overflow checking
Newsgroups comp.lang.java.programmer, comp.lang.c
Followup-To comp.lang.java.programmer
References (5 earlier) <fn3m17p1p5ipsit6ltmg6rqtlcf5kvdmep@4ax.com> <1d742049-31f6-4eb6-8832-9cce3f25091d@a31g2000vbt.googlegroups.com> <ivg9cp$akq$1@dont-email.me> <08jn17t10eb6qgfdlvriqq8j6e17k5u2ou@4ax.com> <32kp27hs1qqcvmdcs9ol4cqg9ge7e4q2u7@4ax.com>
Message-ID <d0fXp.16796$wc1.14117@newsfe04.iad> (permalink)
Date 2011-07-25 10:24 -0400

Cross-posted to 2 groups.

Followups directed to: comp.lang.java.programmer

Show all headers | View raw


On July 24, 2011 22:13, in comp.lang.c, dave.thompson2@verizon.net wrote:

> On Mon, 11 Jul 2011 21:31:11 -0700, Gene Wirchenko <genew@ocis.net>
> wrote:
> 
>> On Mon, 11 Jul 2011 21:51:28 -0400, Eric Sosman
>> <esosman@ieee-dot-org.invalid> wrote:
>> 
>> >On 7/11/2011 5:54 PM, tm wrote:
>> >>[...]
>> >> Correct results can be computed without any slowdown,
>> >> when the CPU is able to trigger an overflow interupt.
>> >>
>> >> A slowdown would only happen when an overflow occurs.
>> >> Computations without overflow would run at full speed.
>> >
>> >     Well, no.  At least, not in any trap-capable architecture I've
>> >seen.  Three points:
>> 
>> [snipped nice explanation]
>> 
>>      How about an example of such an architecture?  A URL would be
>> fine.  I believe that /370 had something like that for floating point,
>> but not for integer.
>> 
> S/360 and all successors have masked interrupts for overflows in
> 'fixed-point' (integer) and decimal (BCD), and unmasked for (original)
> floating-point now retronymed 'hex' floating-point. Since IIRC S/390
> there is also 'binary' (IEEE) floating-point with its own separate and
> more complicated status flags, masks and interrupt causes.
> 
> I can't find a usable ref on the IBM site,

You probably want IBM's documentation site. Here's a link to 

z/Architecture Principles of Operations
http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/download/DZ9ZR006.pdf?DT=20080213005418&XKS=dz9zbk08

You want page 6-14 and after for "Program Interruption"; the various Data
Exceptions are documented there, including fixed, floating point, and IEEE
floating point data exceptions.

HTH
-- 
Lew Pitcher
Master Codewright & JOAT-in-training   | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
----------      Slackware - Because I know what I'm doing.         ------

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Re: Arithmetic overflow checking Gene Wirchenko <genew@ocis.net> - 2011-07-11 07:58 -0700
  Re: Arithmetic overflow checking Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-07-11 10:48 -0700
    Re: Arithmetic overflow checking Gene Wirchenko <genew@ocis.net> - 2011-07-11 14:40 -0700
  Re: Arithmetic overflow checking tm <thomas.mertes@gmx.at> - 2011-07-11 14:54 -0700
    Re: Arithmetic overflow checking Gene Wirchenko <genew@ocis.net> - 2011-07-11 15:55 -0700
    Re: Arithmetic overflow checking Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-07-11 21:51 -0400
      Re: Arithmetic overflow checking Gene Wirchenko <genew@ocis.net> - 2011-07-11 21:31 -0700
        Re: Arithmetic overflow checking Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-07-11 23:16 -0700
        Re: Arithmetic overflow checking James Kuyper <jameskuyper@verizon.net> - 2011-07-12 06:28 -0400
        Re: Arithmetic overflow checking David Thompson <dave.thompson2@verizon.net> - 2011-07-24 22:13 -0400
          Re: Arithmetic overflow checking Lew Pitcher <lpitcher@teksavvy.com> - 2011-07-25 10:24 -0400

csiph-web