Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* New Alpha programmer seeks info on double precision comparison exception
@ 2000-01-06  5:00 Peter Willis
  2000-01-06  5:00 ` Greg Lindahl
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Willis @ 2000-01-06  5:00 UTC (permalink / raw)


Hi everyone,

I am programming some stuff on an alpha 21164 workstation.

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*/
{
}

Peter





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New Alpha programmer seeks info on double precision comparison exception
  2000-01-06  5:00 New Alpha programmer seeks info on double precision comparison exception Peter Willis
  2000-01-06  5:00 ` Greg Lindahl
@ 2000-01-06  5:00 ` Steve Lionel
  2000-01-07  5:00 ` Christopher Browne
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Lionel @ 2000-01-06  5:00 UTC (permalink / raw)


On Thu, 6 Jan 2000 11:35:16 -0800, "Peter Willis"
<peterw@coastnet.com> 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New Alpha programmer seeks info on double precision comparison exception
  2000-01-06  5:00 New Alpha programmer seeks info on double precision comparison exception Peter Willis
@ 2000-01-06  5:00 ` Greg Lindahl
  2000-01-06  5:00 ` Steve Lionel
  2000-01-07  5:00 ` Christopher Browne
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Lindahl @ 2000-01-06  5:00 UTC (permalink / raw)


"Peter Willis" <peterw@coastnet.com> writes:

> I am programming some stuff on an alpha 21164 workstation.

And you're using NT, and this is a Linux newsgroup.

> On the alpha microprocessors how do I keep the boolean comparison of two
> double precision floating point numbers from generating an exception?

There should be a compiler flag to turn on full IEEE floating
point. You probably have an uninitialized variable which happens to
contain an IEEE denorm or infinity or something.

-- g



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New Alpha programmer seeks info on double precision comparison exception
  2000-01-06  5:00 New Alpha programmer seeks info on double precision comparison exception Peter Willis
  2000-01-06  5:00 ` Greg Lindahl
  2000-01-06  5:00 ` Steve Lionel
@ 2000-01-07  5:00 ` Christopher Browne
  2 siblings, 0 replies; 4+ messages in thread
From: Christopher Browne @ 2000-01-07  5:00 UTC (permalink / raw)


In article <d76d4.16$z87.188652@news.bctel.net>, Peter Willis wrote:
>Hi everyone,
>
>I am programming some stuff on an alpha 21164 workstation.
>
>The problem I am having is with MS visual C++ and a small console program
>that I am running.

You might find it more likely that you would get useful answers if you
either:

a) Asked in an NT newsgroup, as it is more likely that NT users would
   be using Visual C++ than Linux users, or

b) Asked what code is generated by either G++ or the Compaq C++
   compilers, as those are the compilers that are usable on Linux.
-- 
"Of course 5  years from now that will be different,  but 5 years from
now  everyone  will  be  running  free  GNU on  their  200  MIPS,  64M
SPARCstation-5."  -- Andrew Tanenbaum, 1992.
cbbrowne@hex.net - - <http://www.hex.net/~cbbrowne/lsf.html>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-01-07  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-06  5:00 New Alpha programmer seeks info on double precision comparison exception Peter Willis
2000-01-06  5:00 ` Greg Lindahl
2000-01-06  5:00 ` Steve Lionel
2000-01-07  5:00 ` Christopher Browne

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