Science Fair Projects Ideas - SIGFPE

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

SIGFPE


FPE_INTOVF Integer overflow.
FPE_FLTDIV Floating-point divide by zero.
FPE_FLTOVF Floating-point overflow.
FPE_FLTUND Floating-point underflow.
FPE_FLTRES Floating-point inexact result.
FPE_FLTINV Invalid floating-point operation.
FPE_FLTSUB Subscript out of range.

SIGFPE is the symbolic signal name for the signal sent to computer programs that perform erroneous arithmetic operations on POSIX compliant platforms. SIGFPE is a symbolic constant defined in signal.h. Symbolic signal names are used as signal numbers can vary across platforms.

Contents

Etymology

SIG- is a common prefix for signal names, FPE is the Acronym of Floating Point Exception.

Description

SIGFPE is sent to processes for a variety of reasons, a common example might be an unexpected type overflow (eg, unsigned integer) due to exceptional input, or an error in a program construct.

SIGFPE can be handled, that is, programmers can specify the action they want to occur on receiving the signal, such as calling a subroutine, ignoring the event, or restoring the default action.

Note that under certain circumstances ignoring a SIGFPE can result in Nasal demons. However it is safe to ignore SIGFPE signals not generated by the operating system, such as users with the appropriate permissions to use the kill() system call.

Example

Here is an example of an ANSI C program that should attempt to perform an Erroneous Artihmetic Operation, specifically an FPE_INTDIV, or Integer Division by zero.

int main()
{
       int x = 42/0;
}

Compiling and running it on IA-32 with Linux produces the following:

$ gcc -o sigfpe sigfpe.c
$ ./sigfpe
Floating point exception (core dumped)

Backtrace from gdb:

Program received signal SIGFPE, Arithmetic exception.
0x08048373 in main ()

Compare

See Also

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice