When do I get floating point exceptions?
Take care
Oliver
--
-- Oliver Axel Ruebenacker Physics Graduate Student --
-- Computational Condensed Matter Theory --
-- Univ. of Mass. at Amherst & Univ. of Karlsruhe, Germany --
-- http://www.ruebenacker.de/ Oli...@Ruebenacker.de --
-- 347 Prince House, UMass Amherst MA 01003 (413) 546 5919 --
-- Office: 414 Hasbrouck Lab (413) 545 0561 --
There is no such thing in standard C++. Your compiler might implement them
but it is doing so as an extension to the C++ language. The usual suspects
may generate floating point exceptions, why don't you try them and see?
1.0/0.0
sqrt(-1.0);
1e300*1e300
john
Just don't write it like this in a program. Make sure you have
variables that you multiply so that the actual operation happens
during run-time, not compile-time. Otherwise your compiler is
likely to choke or give you an error.
Victor
--
Please remove capital A's from my address when replying by mail
Be careful about terminology here -- it's tricky. A "floating point
exception" occurs when one of several things goes wrong in a floating
point computation. IEE-754 defines what these things are, and what
happens when they occur. The word "exception" in "floating point
exception" has nothing to do with the word "exception" as it is used in
the C++ language definition.
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Contributing Editor, C/C++ Users Journal (http://www.cuj.com)
In my opinion, you need to say more.
The term "exception" is overloaded in several different contexts.
Computer manufacturers use an even narrower definition
than is found in the floating-point arithmetic standard.
There is no portable standard for floating-point exception handling
because there is no way to implement it on every platform
without a serious negative impact on performance.
That doesn't mean that a standard wouldn't be useful.
It just means that compilers might refuse to install standard
exception handlers on platforms that don't provide hardware
to detect the corresponding floating-point exception efficiently.
You can get them for numerous reasons. My compiler's help
mentions the following:
Invalid Operation
Division by Zero
Overflow
Underflow
Inexact Result
Integer Overflow
What he said was absolutely correct. Personal attacks are inappropriate.
The statement "you are an asshole" certainly qualifies
as a personal attack. It was also uncalled for in this
context and is inappropriate in this forum. This forum
is for discussion of C++ and closely related issues.
The injection by Mr. Keye of crude namecalling into a
heretofor sensible discussion is enough to earn him a
position in my killfile. For Mr. Carriage to condone
such rubbish earns him such honor as well.
<plonk> <plonk>.
--
Larry Brasfield
Above opinions may be mine alone.
(Humans may reply at unundered l.bras_field@computer.o_r_g )
That's off-topic.
________
"Yields falsehood when preceded by its quotation" yields falsehood when
preceded by its quotation.
Josh Sebastian
<cur...@earthlink.net>
That was a joke. You obviously have no sense of humor.
> "nullcyper" <clea...@syntax.net> wrote in message
> news:8oaiki$bsp$1...@pita.alt.net...
> > Josh Sebastian (cur...@earthlink.net) wrote:
> > >
> > > > > > > In my opinion, you need to say more.
> > > > > > <chop>
> > > > > >
> > > > > > In my opinion, you are an asshole, and need to say less.
> > > > >
> > > > > What he said was absolutely correct. Personal attacks are
> inappropriate.
> > > > >
> > > > >
> > > > His statement of opinion is not a personal attack. And it is an
> opinion
> > > > shared by many: Tisdale is an asshole.
> > > >
> > >
> > > That's off-topic.
> > >
> >
> > You must be a Tisdale wannabe or a Tisdale lickspittle. Twit.
>
> That was a joke. You obviously have no sense of humor.
>
> ________
>
> "Yields falsehood when preceded by its quotation" yields falsehood when
> preceded by its quotation.
>
> Josh Sebastian
> <cur...@earthlink.net>
Hi Josh,
Please don't respond to the trolls.
Thanks in advance, Bob Tisdale