Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » FP exception vs NaN
Re: Capture division by zero [message #55294 is a reply to message #55292] Tue, 27 October 2020 18:52 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14256
Registered: November 2005
Ultimate Member
koldo wrote on Tue, 27 October 2020 17:18
Quote:
Yeah, so your program now does not work in debug for particular input data. What is the next step?


The next step when TheIDE debugger breaks is to solve the problem Smile


But how? There is obviously a combination of input data that leads to FP exceptions. How are you going to solve it?

If you wanted to check the inputs before processing them, you would have to trace back all calculations back to inputs and do other calculations just make sure this particucal input dataset does not cause the problem.

That is the part I never solved and that makes me appreciate the idea of using NaN for what it was indended too.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dumb bug. Improper use of Null
Next Topic: strange MinGw return
Goto Forum:
  


Current Time: Wed Apr 30 00:37:00 CEST 2025

Total time taken to generate the page: 0.01078 seconds