From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,a14c54186e85e367 X-Google-Attributes: gid111c93,public From: Steve Lionel Subject: Re: New Alpha programmer seeks info on double precision comparison exception Date: 2000/01/06 Message-ID: <3gt97sgselonsf82lcicdu0u2j4d2fcb6j@4ax.com>#1/1 X-Deja-AN: 569224949 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 947189399 11691 16.31.64.86 (6 Jan 2000 20:09:59 GMT) Organization: Compaq Computer Corporation Mime-Version: 1.0 NNTP-Posting-Date: 6 Jan 2000 20:09:59 GMT Newsgroups: comp.os.linux.alpha On Thu, 6 Jan 2000 11:35:16 -0800, "Peter Willis" wrote: >The problem I am having is with MS visual C++ and a small console program >that I am running. > >On the alpha microprocessors how do I keep the boolean comparison of two >double precision floating point numbers from generating an exception? > >Why would this generate an illegal floating point operation exception. > >ie: >double a,b; > >if(a > b) /*exception is generated at this point*/ Most likely, one of a or b is not a valid floating point value. It could be an exceptional value or a denorm - by default, these are considered invalid. I know that in Compaq's compilers there is an option to allow these types of values to be used, but I don't know offhand what it is in MSVC (which reminds me that you posted in a Linux newsgroup, and MSVC doesn't run there...) The most likely situation is that a or b is uninitialized or you have an error in argument passing. Steve Lionel (mailto:Steve.Lionel@compaq.com) Fortran Engineering Compaq Computer Corporation, Nashua NH Compaq Fortran web site: http://www.compaq.com/fortran