Floating point exception error
Hi all,
When i try to run my application on an arm board with linux OS , the application crashes with floating point exception . Could someone tell me why would a floating point exception occur in general . Thanks |
google is thy friend
Quote:
|
Isn't it also possible that you have compiled your app with compiler options that assumes there is a floating point processor present and you don't have one on your ARM board? More info on your target hardware, please?
|
Hello,
I dig up this old thread : I am in the same situation as mathb 2 years ago : I try to run my application on an arm board with linux OS and the application crashes sometimes (rare) with floating point exception. There is a dividing operation in the code, (random division) but I check that it is not a zero divide. What seems the more probable is "Inexact" type reported by akuthia... But I don't really understand why "Inexact" type is a problem? i.e why making operation 2.0 / 3.0 should crash the application? In my mind the result should just be truncated to 0.6666667 .... Thanks |
In your mind, it does get truncated, a computer doesnt have a "mind" to truncate it, unless it was specifically programmed to do so, thus the error.
|
Okay, I made a quick hello world test with 2.0/3.0 operations and with my environment, it is truncated to 0.666667 .
So there is no problem with that. I found my error which was finally a 0 divide operation not properly managed in a specific case. Thank you. |
All times are GMT -5. The time now is 01:39 PM. |