Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 1999 02:19:11 -0500 (EST)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        A_Johns@TurnAround.com.au (Andrew Johns)
Cc:        cjclark@home.com, gjb@comkey.com.au, freebsd-questions@FreeBSD.ORG
Subject:   Re: FP Math
Message-ID:  <199903030719.CAA04352@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <36DCD162.AC62A10E@TurnAround.com.au> from Andrew Johns at "Mar 3, 99 05:06:26 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Johns wrote,
> "Crist J. Clark" wrote:
> 
> > For example, the above program returns,
> >
> > inf
> >
> > On my SGI.
> >
> 
> inf = infinity??

Yes, that is what the output means.

> ie: overflow

Yep.

> ie: exception if overflow is not trapped

Nope, there is no floating point exception, no trapping.

> => SGI is merely trapping the oveflow.

Right, which I would like my FreeBSD to do. This goes back to my
original question, that was dropped in the first response, how can I
make sure I am using IEEE STANDARD 754 Floating-Point Arithmetic,
where ('man math'),

              Exceptions:
                     IEEE 754 recognizes  five  kinds  of  float-
                     ing-point   exceptions,   listed   below  in
                     declining order of probable importance.
                             Exception              Default Result
                             __________________________________________
                             Invalid Operation      NaN, or FALSE
                             Overflow               +-Infinity
                             Divide by Zero         +-Infinity
                             Underflow              Gradual Underflow
                             Inexact                Rounded value
                     NOTE:  An Exception is not an  Error  unless
                     handled badly.  What makes a class of excep-
                     tions exceptional is that no single  default
                     response   can   be  satisfactory  in  every
                     instance.  On the other hand, if  a  default
                     response will serve most instances satisfac-
                     torily, the unsatisfactory instances  cannot
                     justify  aborting computation every time the
                     exception occurs.

The program itself never receives a SIGFPE in my example. My example
is not an 'exceptional exception.'
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903030719.CAA04352>