Floating exception (core dumped) 
Author Message
 Floating exception (core dumped)

Newbie question: I wrote this little program that I compiled on using GCC on
a Unix system and it compiled fine, when I ran it I was able to get it to
work for a little while, but then it would quit saying Floating exception
(core dumped)...I was able to get it to work fine using a DOS
compiler...could anyone tell me what this means?  Thanks.



Tue, 22 Aug 2000 03:00:00 GMT  
 Floating exception (core dumped)


Quote:

>Newbie question: I wrote this little program that I compiled on using GCC on
>a Unix system and it compiled fine, when I ran it I was able to get it to
>work for a little while, but then it would quit saying Floating exception
>(core dumped)...I was able to get it to work fine using a DOS
>compiler...could anyone tell me what this means?  Thanks.

It means that your program isn't robust. It is most likely failing because it
not meeting the preconditions for the proper execution of some floating point
operation.

For example, the floating point division operation has, among its
preconditions, that the divisor must not be zero. But it may have other
preconditions as well, related to the range of the result. Dividing
a very large number by a very small number may call for a result
that cannot fit into the floating point type. Addition, multiplication
and other operations all have such restrictions.

Why don't you insert debugging statements into your program to find out
where this problem is happening, or step through it with a de{*filter*}?



Tue, 22 Aug 2000 03:00:00 GMT  
 Floating exception (core dumped)

: Newbie question: I wrote this little program that I compiled on using GCC on
: a Unix system and it compiled fine, when I ran it I was able to get it to
: work for a little while, but then it would quit saying Floating exception
: (core dumped)...I was able to get it to work fine using a DOS
: compiler...could anyone tell me what this means?  Thanks.

If it runs under MSDOS, and not under Unix, then very probably you're
messing up memory allocation/access somewhere; Unix is a lot more
careful in this regard than MSDOS, which will let you do more or less
whatever you want.  Check malloc() and free(), and check particularly
pointer dereferencing.

Will



Wed, 23 Aug 2000 03:00:00 GMT  
 Floating exception (core dumped)


: : Newbie question: I wrote this little program that I compiled on using GCC on
: : a Unix system and it compiled fine, when I ran it I was able to get it to
: : work for a little while, but then it would quit saying Floating exception
: : (core dumped)...I was able to get it to work fine using a DOS
: : compiler...could anyone tell me what this means?  Thanks.

: If it runs under MSDOS, and not under Unix, then very probably you're
: messing up memory allocation/access somewhere; Unix is a lot more
: careful in this regard than MSDOS, which will let you do more or less
: whatever you want.  Check malloc() and free(), and check particularly
: pointer dereferencing.

Wouldnt memory allocation problems liek index out of bopunds more likely
give segmentation fault
rather than floating point exceptions.
Most likely there could be something wrong with the the calculations part.

like division by zero or improper calls to functions like of the form
log(0)
sqrt(-2) etc etc

Any way its difficult to say w/o seeing the code
Deepu

: Will

--
------------------------------------------------------------------------
Res:
628, South 12 street, Apt# 5
Lincoln, NE-68508



Wed, 23 Aug 2000 03:00:00 GMT  
 Floating exception (core dumped)


writes:

Quote:

>>Newbie question: I wrote this little program that I compiled on using GCC on
>>a Unix system and it compiled fine, when I ran it I was able to get it to
>>work for a little while, but then it would quit saying Floating exception
>>(core dumped)...I was able to get it to work fine using a DOS
>>compiler...could anyone tell me what this means?  Thanks.

>It means that your program isn't robust. It is most likely failing because it
>not meeting the preconditions for the proper execution of some floating point
>operation.

>For example, the floating point division operation has, among its
>preconditions, that the divisor must not be zero. But it may have other
>preconditions as well, related to the range of the result. Dividing
>a very large number by a very small number may call for a result
>that cannot fit into the floating point type. Addition, multiplication
>and other operations all have such restrictions.

>Why don't you insert debugging statements into your program to find out
>where this problem is happening, or step through it with a de{*filter*}?

I think GCC does this for conversion to integer overflow also.
Aloha


Thu, 24 Aug 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. segmentation fault(Core dumped)

2. segmentation fault(Core dumped)

3. gcc program core dump

4. memset core dump

5. provent abort from producing core dump?

6. core dumped with Gnu GSL

7. returning unions from functions dumps core

8. unexplained core dumps - newbie

9. Core dump on linux but not UNIX

10. Dumped core...help please

11. Why the core dump in this code?

12. Pointer problems result in core dump

 

 
Powered by phpBB® Forum Software